nginx command not found
-bash: nginx: command not found在Centos中无法在任意路径中执行nginx命令,需进入nginx目录才可以执行,解决方案是:在/etc/profile中增加nginx的执行路径的环境变量添加nginx环境变量vim /etc/profile# 增加nginx的执行文件路径# nginxexport PATH="/usr/local/nginx/sbin:$PATH"# 保存环境变量source /etc/profile验证nginx.conf配置nginx -t无痛重启nginxnginx -s reload
继续阅读