Nginx:command not found

起因: 想查看nginx的安装配置信息,有安装了哪些模块,在使用nginx -V命令却提示如题错误。


解决方法:

vim /etc/profile


在页末添加以下两句:

PATH=$PATH:/home/nginx/nginxssl/sbin   #nginx启动文件路径 

export PATH


保存


生效配置:

source /etc/profile


重新查看nginx配置

nginx -V

image.png



猜你喜欢

转载自blog.51cto.com/13502993/2457228