)Permission denied: make_sock: could not bind to address [::]:8086

Permission denied: make_sock: could not bind to address [::]:8086

在服务器中部署php,启动时遇到了这个问题:
[root@localhost html]# service httpd start
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.termwikidev for ServerName
(13)Permission denied: make_sock: could not bind to address [::]:8086
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:8086
no listening sockets available, shutting down
Unable to open logs

解决办法:

semanage port -l|grep http
semanage port -a -t http_port_t -p tcp 81

这个两个命令一是查看,一个是添加,添加完再查看一遍,如果有81,则成功。另可能要以root用户运行。

此外,如果要外网访问,还要打开linux的防火墙:

[root@localhost html]# vim /etc/sysconfig/iptables
[root@localhost html]# service iptables restart

重启apache.

猜你喜欢

转载自fhg2010.iteye.com/blog/1749127