临时环境变量永久环境变量 临时环境变量export GITLAB_HOME=/srv/gitlab 永久环境变量 法一:编辑 **/etc/profile,然后激活 `source /etc/profile*` ``` if [ -d /etc/profile.d ]; then for i in /etc/profile.d/.sh; do if [ -r $i ]; then. $i fi done unset i fi export GITLAB_HOME=/srv/gitlab ```