关于一个selinux的问题

[root@localhost ~]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2018-05-17 09:44:33 CST; 43s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 1163 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 1162 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 1162 (code=exited, status=1/FAILURE)


May 17 09:44:33 localhost.localdomain httpd[1162]: (13)Permission denied: AH00072: make_sock: could not b...808
May 17 09:44:33 localhost.localdomain httpd[1162]: (13)Permission denied: AH00072: make_sock: could not b...808
May 17 09:44:33 localhost.localdomain httpd[1162]: no listening sockets available, shutting down
May 17 09:44:33 localhost.localdomain httpd[1162]: AH00015: Unable to open logs
May 17 09:44:33 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, statu...LURE
May 17 09:44:33 localhost.localdomain kill[1163]: kill: cannot find process ""
May 17 09:44:33 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
May 17 09:44:33 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
May 17 09:44:33 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
May 17 09:44:33 localhost.localdomain systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]# setenforce 0
[root@localhost ~]# systemctl restart httpd
[root@localhost ~]# setenforce 1
[root@localhost ~]# systemctl restart httpd

Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.


得出的结果确实是selinux导致的,但是网络上都是说关闭selinux来解决,为什么不能就更改selinux策略来解决呢?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值