Home >Operation and Maintenance >Nginx >What should I do if the system prompts that the nginx command cannot be found?

What should I do if the system prompts that the nginx command cannot be found?

王林
王林forward
2020-09-02 16:15:055207browse

What should I do if the system prompts that the nginx command cannot be found?

Problem restoration:

(Recommended tutorial: nginx tutorial)

What should I do if the system prompts that the nginx command cannot be found?

Solution Method:

1. Open the file where the environment variable is located:

vim /etc/profile

2. At the end of the profile file, add a line

指向你的nginx的安装位置的sbin 目录
PATH=$PATH:/usr/local/nginx/sbin

3. Reload the environment

source /etc/profile

The above is the detailed content of What should I do if the system prompts that the nginx command cannot be found?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete