部署服务的一般步骤:
1.准备环境
关闭防火墙: service iptables stop(chkconfig iptables off)
关闭selinux: setenforce 0(/etc/sysconfig/selinux -> selinux=disabled)
配置IP地址
2.安装软件包
3.修改配置文件
4.重启服务
部署apache服务
apache提供网页访问服务
步骤:
yum install httpd –y
vim /etc/httpd/conf/httpd.conf
扫描二维码关注公众号,回复:
2719624 查看本文章
Listen 80(http默认80端口)
DocumentRoot “/var/www/html”(默认页面为其下的index.html)
hostname 域名, vim /etc/hosts ->修改对应域名(需要DNS解析)
service httpd restart