步骤一:构建httpd服务器
1)使用yum安装httpd、httpd-manual软件包
[root@svr5 ~]# yum -y install httpd httpd-manual
.. ..
[root@svr5 ~]# rpm -q httpd
httpd-2.2.15-29.el6_4.x86_64
2)启用httpd服务,并设为开机自动运行
[root@svr5 ~]# service httpd restart ; chkconfig httpd on
停止 httpd: [失败]
正在启动 httpd:httpd: apr_sockaddr_info_get() failed for svr5
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
httpd服务默认监听TCP协议的80端口,可通过netstat检查确认:
[root@svr5 ~]# netstat -anptu |grep httpd
tcp 0 0 :::80 :::* LISTEN 26426/httpd
3)备份httpd默认配置文件httpd.conf
httpd默认的配置文件放在/etc/httpd/conf/httpd.conf,从下一个实验开始会调整Web服务配置,建议大家先对配置文件做好备份,方便在必要的时候用来快速恢复。
[root@ svr5 ~]# cp