#设置环境变量#临时变量,重启失效[root@zhu tmp]# export PATH=$PATH:/usr/local/nginx/sbin/[root@zhu tmp]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
#永久变量[root@zhu /]# cd /etc/profile.d/[root@zhu profile.d]# ls
256term.csh colorls.csh lang.sh sh.local which2.sh
256term.sh colorls.sh less.csh vim.csh
colorgrep.csh csh.local less.sh vim.sh
colorgrep.sh lang.csh python3_lib.sh which2.csh
[root@zhu profile.d]# vim nginx.shexport PATH=$PATH:/usr/local/nginx/sbin/
[root@zhu profile.d]# source nginx.sh[root@zhu /]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful