linux nginx环境 重启http Failed to restart httpd.service: Unit not found.

2025-06-23 00:42:53
推荐回答(1个)
回答1:

linux nginx环境 重启http Failed to restart httpd.service: Unit not found是设置错误造成的,解决方法为:

1、检查是否安装该程序:which nginx           #查看nginx是否存在which php             #查看php是否存在which mysql          #查看mysql是否存在。

2、yum list nginx             #列出nginxyum install nginx        #安装nginx#看见{Complete! }  安装成功。

3、which nginx    #查看nginx是否存在service nginx start          #启动nginx进程方法

/etc/init.d/nginx start     #启动nginx进程方法,ps -ef | grep nginx #查看nginx进程。

4、ifconfig           #查看网卡信息打开浏览器:http://182.92.73.109/看到 { 欢迎界面 } 说明安装成功。