nginx 添加到環境變量中


nginx熱啟動命令

nginx -s reload

報錯
-bash: nginx: command not found
一般通過執行/usr/local/nginx/sbin/nginx -s reload,每次都要去找目錄比較麻煩,所以吧nginx配置到環境變量里用nginx之類執行指令

步驟如下:
1、編輯/etc/profile

vim /etc/profile

2、在最后一行添加配置,:wq保存

PATH=$PATH:/usr/local/nginx/sbin
export PATH

3、使配置立即生效

source /etc/profile


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM