1、安装Apache httpd在Centos环境下
yum install httpd
2、将Apache httpd设置为开机自启
chkconfig httpd on
使用chkconfig查看是否开启成功:

此时为开启成功
3、开启httpd服务
receive httpd start

服务开启成功
4、更改配置文件
cd /etc/httpd/conf
vim http.conf
找到ServerName将www.example.com改为localhost

5、查看防火墙是否开启(如果未开启或导致Ip访问不了)


6、使用Windows访问

此时,Apache httpd服务器就搭建好了
本文介绍了在Centos环境下搭建Apache httpd服务器的步骤,包括安装、设置开机自启、开启服务、更改配置文件、查看防火墙状态,最后可使用Windows进行访问,完成服务器搭建。
2920

被折叠的 条评论
为什么被折叠?



