当前位置: > Linux故障 >

Nginx启动报错: Job for nginx.service failed because the control process exited

时间:2019-02-02 17:06来源:linux.it.net.cn 作者:IT
Nginx启动报错: Job for nginx.service failed because the control process exited


在安装nginx完成后执行:service nginx start后报错:
Starting nginx (via systemctl): Job for nginx.service failed because thournalctl -xe” for details.

这是centos7下的一个bug。

解决方法:
如果是你的apache服务器没有关,关掉后启动nginx就行,如果不行,按照下面步骤操作:

1,移除掉刚才安装的nginx
执行:yum remove nginx

2,添加Centos Nginx yum资源库
执行:rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm Retrieving http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm


3,安装nginx
执行:yum install -y nginx

4,service nginx start   就可以看到启动成功啦


!!!注意第三步不能写成yum install nginx
如果启动成功记得点个赞~



(责任编辑:IT)
------分隔线----------------------------