赞
踩
只需要在配置文件中把nginx加入环境变量 系统:CentOS7.2
1,vim /etc/profile
vim /etc/profile
2,在文件最后添加
PATH=$PATH:/usr/local/nginx/sbin export PATH
3,保存修改,执行source /etc/profile,重新载入配置文件
source /etc/profile
4,执行nginx -s reload ,看看是否成功
nginx -s reload