错误:Permission denied:make_sock:could not bind to address…

no listening sockets available,shutting down

155831128.png

iptables已关闭的情况下,这是selinux启动导致的

解决办法有三个:

1.快速解决(不推荐)

1.setenforce 0

2.改设置文件

vi /etc/sysconfig/selinux

SELINUX=enforcing改成SELINUX=disabled

重启reboot

3.从根上解决(推荐)

根据自己的需求在selinux中添加需要指定的端口

a)前提需要先安装semanage(Centos6.0默认没有安装该应用

安装方式参看 RHEL 6: semanage SELinux Command Not Found

也可以参看 http://wiki.centos.org/HowTos/SELinux

# yum provides /usr/sbin/semanage

或者

#yum whatprovides /usr/sbin/semanage

#yum -y install policycoreutils-python

#semanage

b)使用semanage添加apache侦听的端口

参看 http://hi.baidu.com/5212521/blog/item/0b998b1bdb15c7018618bf8c.html  http://hi.baidu.com/ldtrain/blog/item/59c9bb1e242247fee0fe0b5b.html

查看现在的支持http的端口有哪些

#semanage port -l|grep http

http服务添加新的端81

#semanage port -a -t http_port_t -p tcp 81

查看添加的结果

#semanage port -l|grep http

 

http://blog.csdn.net/bjbs_270/article/details/6948074