1、安装Apache
[root@localhost ~]# yum -y install httpd
设置开启自启动
[root@localhost ~]# chkconfig httpd on
启动httpd服务
[root@localhost ~]# service httpd start Starting httpd: httpd: Could not reliably determine the server‘s fully qualified domain name, using ::1 for ServerName [ OK ]
测试:如果是远程访问的话,需要在服务器上放行80端口
原文:http://www.cnblogs.com/zhongguiyao/p/7525483.html