現象 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