We use and recommend omnibus method with latest Ubuntu LTS.
#Install and configure the necessary dependencies
sudo apt-get install curl openssh-server ca-certificates postfix
#Add the GitLab package server
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
#install the package
sudo apt-get install gitlab-ce
#Configure and start GitLab
sudo gitlab-ctl reconfigure
All Gitalb related configurations are stored in /etc/gitlab/gitlab.rb
vim /etc/gitlab/gitlab.rb
Useful links:
Gitlab offers too many options. We are using:
Based on this official doc. For S3 instructions, jump here.
sudo gitlab-rake gitlab:backup:create
Run
crontab -e
Add
0 2 * * * /opt/gitlab/bin/gitlab-rake gitlab:backup:create CRON=1
Download latest backup from S3 or copy from old server to location /var/opt/gitlab/backups
Run
# Stop the processes that are connected to the database.
sudo gitlab-ctl stop unicorn
sudo gitlab-ctl stop sidekiq
# Verify
sudo gitlab-ctl status
# Restore
sudo gitlab-rake gitlab:backup:restore
# Restart gitlab and verify
sudo gitlab-ctl start
sudo gitlab-rake gitlab:check SANITIZE=true
sudo apt-get update
sudo apt-get install gitlab-ce
Start
gitlab-ctl deploy-page up
Stop
gitlab-ctl deploy-page down
Useful