root权限启动apache报错

来源:互联网 发布:fpga与单片机的区别 编辑:程序博客网 时间:2024/05/17 20:53

修改/etc/httpd/conf/httpd.conf,添加监听端口后,启动报错。

[root@localhost tool]# /etc/init.d/httpd restart停止 httpd:[确定]正在启动 httpd:(13)Permission denied: make_sock: could not bind to address [::]:81  //许可被拒绝,不能绑定这个端口(13)Permission denied: make_sock: could not bind to address 0.0.0.0:81no listening sockets available, shutting downUnable to open logs
但是我已经是root权限了。原来是SELinux的安全问题。

[root@localhost tool]# getenforce Enforcing   //已开启[root@localhost tool]# setenforce 0   //暂时关掉它[root@localhost tool]# getenforce Permissive
然后在启动apache。启动成功!!



0 0
原创粉丝点击