将nginx永久加入到系统环境变量 php,mysql的永久方法跟这个一样 下来配置环境变量 在/etc/profile 中加入: export NGINX_HOME=/usr/local/nginxexport PATH=$PATH:$NGINX_HOME/sbin 保存, 执行 source /etc/profile ,使配置文件生效。