Linux系统Apache添加监听端口后无法启动服务并报错:Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xeu httpd.service" for details.

导言:这是SE Linux安全机制导致的。

解决方法:

1.查看当前httpd端口

#  semanage port -l|grep http

2.将对应端口加入SE Linux,以8068为例

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

3.再次查看

#  semanage port -l|grep http

4.重启Apache服务

# systemctl restart httpd

5.查看端口状态

# netstat -ntlp|grep http

成功解决!

posted @ 2023-07-19 14:07  DuanYongchun  阅读(816)  评论(0编辑  收藏  举报