Gitlab is a git repository manager with project manager, issue-tracking and CI/CD (Continuos integration/continuos deployment). Gitlab has free version which can be used by anyone on their own hardware, many company prefered Gitlab over Github because it can self hosted and free.
Not only developer can use Gitlab, event the designer, Business Development, Quality Assurance can use the gitlab for their use case. If you have experience using Github, it will take no time to familiarize your self with the UI, because the main basic of git still apply.
Set DNS Record
Setup A Record for your domain, for example I’ll use gitlab.atetux.com. The configuration depend on your DNS Hosting
Gitlab will take care of DNS instalation and management, so we wont need to changes anything after set DNS. DNS Propagetion might take up to 24 hours, but in most case it take less the few minutes. Verify this by ping your gitlab domain
PING gitlab.atetux.com (192.168.169.170) 56(84) bytes of data. 64 bytes from 192.168.169.170 (192.168.169.170): icmp_seq=1 ttl=51 time=195 ms 64 bytes from 192.168.169.170 (192.168.169.170): icmp_seq=2 ttl=51 time=194 ms 64 bytes from 192.168.169.170 (192.168.169.170): icmp_seq=3 ttl=51 time=195 ms 64 bytes from 192.168.169.170 (192.168.169.170): icmp_seq=4 ttl=51 time=194 ms 64 bytes from 192.168.169.170 (192.168.169.170): icmp_seq=5 ttl=51 time=194 ms
or use host
host gitlab.atetux.com gitlab.atetux.com has address 192.168.169.170
run these command from your Gitlab server.
Update Debian 10
Keep the Debian up to date by updating the packages regularly
sudo apt update; sudo apt upgrade -y
Install necessary dependencies.
sudo apt install -y curl openssh-server ca-certificates gnupg
To send notification email, install Postfix which is recommended by Gitlab. If you using third party mail services, skip this step.
sudo apt install postfix -y
personally I use AWS SES for this purpose, which cheap and reliable. We can use any SMTP server for this purpose, this service really important because every notification, for example Sign Up, Registration, CI/CD failed, etc will send to user email address, you wont want to miss these kind of notifications.
Next step is to run the Gitlab installer, this is there recommended way to install Gitlab, it’ll handle the update and upgrade between Gitlab version.
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
Install the latest version of Gitlab
sudo EXTERNAL_URL="https://gitlab.pesonalokal.net" apt-get install gitlab-ce
to use specific version change command above to
sudo EXTERNAL_URL="https://gitlab.jaranguda.com" apt-get install gitlab-ce=13.6.1-ce.0
where 13.6.1-ce.0 is the version number.
Create first admin
Open Gitlab url
https://gitlab.DOMAIN.com, it’ll asking to change password
For the username use