Debian/ubuntu Users
First trust the GPG public key of GitLab:
Curl Https://packages.gitlab.com/gpg.key 2>/dev/null | sudo apt-key add-&>/dev/null
Then select your Debian/ubuntu version, and the text box will be written in/etc/apt/sources.list.d/gitlab-ce.list
" Deb Http://mirrors.lifetoy.org/gitlab-ce/debian wheezy main " | sudo tee-a/etc/apt/sources.list.d/gitlab-"Deb Http://mirrors.lifetoy.org/gitlab-ce/debian Jessie main" | sudo tee-a/etc/apt/sources.list.d/gitlab-14.04"Deb http://mirrors.lifetoy.org/ Gitlab-ce/ubuntu Trusty main" | sudo tee-a/etc/apt/sources.list.d/gitlab-ce.list
Install Gitlab-ce:
sudo apt-get updatesudo apt-get install Gitlab-ce
Then modify the default domain name:
sudo vim/etc/gitlab/gitlab.rb
But I found on the server after the test is not normal access, check log found that the main problem is: Gitlab installation package comes with Nginx, to use 80 port external service, while unicorn to use 8080 port internal service, but on our server both ports are already occupied.
Therefore, the workaround is: Modify Nginx default port is 8000, specify unicorn default port is 8001, modify Gitlab-shell default port is 8000.
vim/var/opt/gitlab/nginx/etc/gitlab-*:80 changed to listen *:8000,
Vim/var/opt/gitlab/gitlab-rails/etc/unicorn.rb
Change the contents of the Listen line to: Listen "127.0.0.1:8001",: Tcp_nopush = True
Then modify:/var/opt/gitlab/gitlab-shell/config.yml
Gitlab_url: "http://127.0.0.1:8000"
Last executed: Gitlab-ctl reconfigure
Start Service: Gitlab-ctl start
Stop service: Gitlab-ctl stop
Restart Service: Gitlab-ctl restart
View Logs
reids:gitlab-ctl
tail -f
redis
postgresql:gitlab-ctl
tail -f
postgresql
gitlab-workhorse:gitlab-ctl
tail -f
gitlab-workhorse
gitlab-ctl
tail
-Flogrotate
gitlab-ctl
tail -f
nginx
gitlab-ctl
tail -f
sidekiq
gitlab-ctl
tail -f
unicorn
Ubuntu Install Gitlab latest version (slow download problem)