Apache服务部署

 部署服务的一般步骤:

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

       Listen 80(http默认80端口)

       DocumentRoot “/var/www/html”(默认页面为其下的index.html)

hostname 域名, vim /etc/hosts ->修改对应域名(需要DNS解析)

service httpd restart

猜你喜欢

转载自www.cnblogs.com/honel/p/9462937.html
今日推荐