在Linux上部署GitLab應用,通常有以下兩種常見方式:
sudo yum install -y curl policycoreutils-python openssh-server postfix
,并啟動和啟用postfix
服務。curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
。sudo yum install -y gitlab-ce
。/etc/gitlab/gitlab.rb
文件,設置external_url
等參數,然后執行sudo gitlab-ctl reconfigure
。sudo gitlab-ctl start
,并可通過sudo gitlab-ctl enable
設置開機自啟。docker pull gitlab/gitlab-ce:latest
。docker run
命令,例如docker run --detach --hostname gitlab.example.com --publish 443:443 --publish 80:80 --publish 22:22 --name gitlab --restart always --volume GITLAB_HOME/config:/etc/gitlab --volume GITLAB_HOME/logs:/var/log/gitlab --volume GITLAB_HOME/data:/var/opt/gitlab --volume /etc/localtime:/etc/localtime:ro gitlab/gitlab-ce:latest
。/opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
,然后執行gitlab-ctl reconfigure
和gitlab-ctl restart
。