现象 html
修改httpd端口为9080,并启动提示以下: linux
[root@haifeng ~]# service httpd start
Starting httpd: (13)Permission denied: make_sock: could not bind to address [::]:9080
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:9080
no listening sockets available, shutting down
Unable to open logs
[FAILED] socket
问题解决: spa
一、先不重启禁用selinux使用setenforce 0 .net
二、设置配置文件/etc/selinux/config和/etc/sysconfig/selinux里面都禁用selinux,之后重启生效。 htm
网友提示: ci
一、先是查看9080端口有没被其余程序占用 get
#netstat -anpt | grep 9080,未被占用 it
二、查看权限问题, io
三、查看selinux状态
#getenforce 状态为 Enforcing
多是配置未生效,/etc/sysconfig/selinux里面配置是禁用,/etc/selinux/config这里是未禁用
注:getenforce/setenforce查看和设置SELinux的当前工做模式
这是关于httpd在selinux启用下运行在限制模式下,https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Confined_Services/chap-Managing_Confined_Services-The_Apache_HTTP_Server.html