GitLab is a Git repository management system with extensive features like code reviews, issue tracking, activity feeds, and protected branches. This article will provide you with the information on how to install GitLab on Time4VPS servers.
Before installing GitLab, we recommend making sure Apache is not installed on the server (Ubuntu/Debian):
apt-get remove apache2 apache2-bin apache2-data apache2-doc apache2 apache2-utils
1. Downloading and installing dependencies
Make sure you have the latest version of packages:
sudo apt update
Install required packages by running the command below:
sudo apt install -y ca-certificates curl openssh-server postfix tzdata perl
Choose the option "Internet Site":
2. Installing GitHub
Now, we need to install the required repositories, which will be used to download and install GitLab:
sudo curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
When it's done, install the GitLab package using the following command:
sudo apt install gitlab-ee
This process takes some time; please be patient.
3. Configure GitLab settings
To make GitLab accessible via the required domain name, we need to change the external_url parameter. For that, use the following command, which opens the configuration file:
sudo nano /etc/gitlab/gitlab.rb
Now, find the external_url parameter and change the value to your domain name:
external _url "http://domain.com"
We would recommend that you use an encrypted link with the HTTPS protocol. For that, you can enable Let’s Encrypt SSL for the domain name:
external _url "https://domain.com"
If you do not have a domain name yet, you can use your server's IP address. However, it could cause hostname resolving and connection issues.
To apply the new settings, reboot the GitLab service:
sudo gitlab-ctl reconfigure
Note. If you install GitLab without installed the Apache service, you may need to configure a virtual host, as you will most likely be displayed with the default Apache webpage when trying to connect to your chosen URL.
More information on the official site: https://about.gitlab.com/