首页 > 代码库 > 启动httpd报错-已解决

启动httpd报错-已解决

[root@localhost ~]# service httpd start
Starting httpd: (13)Permission denied: make_sock: could not bind to address 192.168.1.153:28080
no listening sockets available, shutting down
Unable to open logs
[FAILED]
[root@localhost ~]#

 

临时办法:

[root@localhost ~]# getenforce
Enforcing
[root@localhost ~]# setenforce 0
[root@localhost ~]# service httpd start
Starting httpd: [ OK ]
[root@localhost ~]#

 

永久办法:

[root@localhost ~]# vi /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
#SELINUX=enforcing
SELINUX=disable
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted