niginx command not found

来源:互联网 发布:mac flapping 编辑:程序博客网 时间:2024/06/05 02:59

centos 安装好nginx后修改了配置文件 nginx.conf,然后准备执行命令:

$:./nginx -s reload
刷新配置文件的时候报错: niginx command not found

解决:

类似windows添加环境变量一样,在.bash_profile  里面添加

.bash_profile   应该在/root  目录下,. 表示这是隐藏文件  用ls -a 可以查看

PATH=$PATH:/home/dev/share_dev/usr_local/nginx/sbin   //*这里这个sbin路径是你自己的nginx的安装路径哦export PATH

然后执行刷新:$ source .bash_profile

0 0
原创粉丝点击