apache更改端口后无法启动显示现象如下:第一次更改端口为:8000
[root@cacti-test cacti]# service httpd start
Starting httpd: httpd: Could not reliably determine the server's
fully qualified domain name, using 127.0.0.1 for ServerName
(13)Permission denied: make_sock: could not bind to address
[::]:8000
(13)Permission denied: make_sock: could not bind to address
0.0.0.0:8000
no listening sockets available, shutting down
Unable to open logs
[FAILED]
尝试第二次将端口改为81
[root@cacti-test httpd]# service httpd start
Starting httpd: httpd: Could not reliably determine the server's
fully qualified domain name, using 127.0.0.1 for ServerName
(13)Permission denied: make_sock: could not bind to address
[::]:81
(13)Permission denied: make_sock: could not bind to address
0.0.0.0:81
no listening sockets available, shutting down
Unable to open logs
[FAILED]
Google 一下,发现原来是 SELinux 安全机制的作用。
(很难搞,如果很多牵扯的权限的事情找不到原因,就可以分析是否是它的作用)
尝试再次启动apache
[root@cacti-test httpd]# service httpd start
Starting httpd: httpd: Could not reliably determine the server's
fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ] 成功!!
永久去掉启动失效方法: