Run to the below command to install the GitLab dependencies.
sudo apt-get update sudo apt-get install ca-certificates curl openssh-server postfix
When prompted, select
Internet Site when configuring
Enter the FQDN.
GitLab provides a bash script that add their repository for you. Just download it and run it.
cd /tmp curl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh sudo bash /tmp/script.deb.sh
Now you can install the GitLab package using the
apt-get package manager.
sudo apt-get install gitlab-ce
You need to first edit the configuration file.
sudo vim /etc/gitlab/gitlab.rb
I added the following line to define my primary hostname and URL.
I also enabled
letsencrypt. If you do, make sure the DNS is setup already.
letsencrypt['enable'] = true letsencrypt['contact_emails'] = ['email@example.com'] letsencrypt['auto_renew'] = true letsencrypt['auto_renew_hour'] = "3" letsencrypt['auto_renew_minute'] = "30" letsencrypt['auto_renew_day_of_month'] = "*/7"
This will auto-renew at 3:30 AM every seventh day. Now run the below command to bring about your changes.
sudo gitlab-ctl reconfigure
If all was successful, you should see
gitlab Reconfigured! on the last line of output.
Browse to the URL and change your password.
Then log in with the
root user and the password you just created.
GitLab is now installed!
It’s time to start configuring it! You may want to look at preventing people signing up.