yum install httpd
service httpd restart
…当然上面我们不成问题
下面说一下坑:
大概意思是无法可靠地确定服务器的完全限定域名,使用127.0.0.1作为ServerName
就是说dns解析不到这个地址
解决方法:vi /etc/httpd/conf/httpd.conf
把#ServerName www.example.com:80改为ServerNamelocalhost:80
然后访问虚拟机的服务器,卧槽打不开什么鬼?
netstat -anp | grep 80
80端口在监听状态下
估计又是防火墙的锅service iptables stop
ok,成功了