解决httpd: Could not reliably determine the server's fully qualified domain name
用vim打开 /usr/local/apache2/conf/httpd.conf
将里面的 #ServerName localhost:80 注释去掉即可。
再执行 /usr/local/apache2/bin/apachectl start
然后curl localhost:80 ,如果显示 “It works!” ,即表示apache已安装并启动成功。