Linux下nginx 启动报Job for nginx.service failed because the control process exited错误解决

巧了我就是萌 提交于 2019-12-11 07:02:49

一、概述

在使用yum安装完毕nginx后,使用 systemctl start  nginx.service报如下错误:

[root@softwares ~]# systemctl start nginx.service 
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

二、问题分析

看上面的报错信息,没有发现具体的错误提示,但是提示信息中提示我们使用journalctl -xe命令可以查看详细信息,于是

提示和SELinux 有关。

三、问题解决

查看SELinux 的状态

[root@softwares nginx]# getenforce 
Enforcing ##启用状态

禁用SELinux

[root@softwares nginx]# setenforce 0
[root@softwares nginx]# getenforce 
Permissive

配置文件也同步修改一下,防止下次重启后,如上命令配置方式失效

[root@softwares nginx]# vim /etc/selinux/config 

修改:SELINUX=disable

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!