执行 nginx -t 报错
-bash: nginx: command not found
原因: 环境变量未配置
解决方案:
vim /etc/profile
PATH=$PATH:/usr/local/nginx/sbin export PATH
重启配置文件生效
source /etc/profile

执行 nginx -t 报错
-bash: nginx: command not found
原因: 环境变量未配置
解决方案:
vim /etc/profile
PATH=$PATH:/usr/local/nginx/sbin export PATH
重启配置文件生效
source /etc/profile