原文:[ISSUE] [Centos] Centos Start Nginx Show: Failed to start nginx.service:unit not found

CMD Line:systemctl start nginx.serviceFailed to start nginx.service: Unit not found. Solution: .vim etc init.d nginx .cd etc init.d chmod etc init.d nginx chkconfig add nginx .service nginx start ...

2018-03-12 17:07 0 3219 推荐指数:

查看详情

centos下启动nginx出现Failed to start nginx.service:unit not found

错误的原因就是没有添加nginx服务,所以启动失败。 解决方法: 1. 在/root/etc/init.d/目录下新建文件,文件名为nginx   或者用命令在根目录下执行:# vim /etc/init.d/nginx (注意vim旁边有一个空格) 2. 插入以下 ...

Sat Dec 23 04:05:00 CST 2017 0 44205
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM