selinux未禁用导致httpd无法使用非80等默认端口解决


selinux未禁用导致httpd无法使用非80等默认端口解决
 
现象
 
修改httpd端口为9080,并启动提示如下:
 
[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]
问题解决:
 
1、先不重启禁用selinux使用setenforce 0
 
2、设置配置文件/etc/selinux/config和/etc/sysconfig/selinux里面都禁用selinux,以后重启生效。
 
网友提示:
 
1、先是查看9080端口有没被其他程序占用 
 
#netstat -anpt | grep 9080,未被占用
 
2、查看权限问题,
 
3、查看selinux状态
 
#getenforce 状态为  Enforcing
 
可能是配置未生效,/etc/sysconfig/selinux里面配置是禁用,/etc/selinux/config这里是未禁用
 
注:getenforce/setenforce查看和设置SELinux的当前工作模式

相关内容

    暂无相关文章