直接使用yum install httpd进行安装
centos7使用 systemctl start httpd
systemctl stop httpd
systemctl start httpd
systemctl status httpd
查看状态的时候有个报错

[root@iZuf61s2xZ ~]# httpd -t
AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using XX. Set the ‘ServerName’ directive globally to suppress this message
Syntax OK
解决办法参考:
https://blog.youkuaiyun.com/a13568hki/article/details/103428237
vim /etc/httpd/conf/httpd.conf
#ServerName www.example.com:80
改成
ServerName localhost:80
在CentOS7上通过yum install httpd安装Apache服务后,启动服务时遇到错误:'AH00558: httpd: Could not reliably determine the server's fully qualified domain name'. 为消除此警告,需要修改配置文件httpd.conf,将ServerName从www.example.com:80改为localhost:80。完成修改并重启httpd服务后,问题得到解决。
3269

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



