问题描述:
执行nginx stop命令,提示-bash: nginx: 未找到命令
解决方式
1、打开环境变量所在的文件:
vim /etc/profile
2、在profile文件末尾,加上一行
指向你的nginx的安装位置的sbin 目录
export PATH=$PATH:/usr/local/nginx/sbin
3、重新加载环境,解决
source /etc/profile
问题描述:
执行nginx stop命令,提示-bash: nginx: 未找到命令
解决方式
1、打开环境变量所在的文件:
vim /etc/profile
2、在profile文件末尾,加上一行
指向你的nginx的安装位置的sbin 目录
export PATH=$PATH:/usr/local/nginx/sbin
3、重新加载环境,解决
source /etc/profile