Introduction
GitLab is a web-based Git repository manager that offers a powerful set of tools for version control and project management. It is an excellent alternative to GitHub and can be used for both personal and professional projects.
In this article, we will guide you through the process of installing GitLab on Fedora.
Prerequisites
- A root or non-root user with
sudo
privileges. - Hardware Requirement: 4GB RAM of memory, 4 cores for your CPU. For more information regarding the hardware. Refer to the following GitLab documentation page.
- OpenSSH for secure communication with Git repositories.
Install GitLab
-
Update the System.
# sudo dnf update -y
-
GitLab has a few dependencies that need to be installed before we can proceed with the installation. Run the following command to install the required dependencies.
# sudo dnf -y install -y curl policycoreutils openssh-server perl
-
Install and Configure Postfix.
# sudo dnf install -y postfix
-
Once the installation is complete, start and enable Postfix by running the following commands.
# sudo systemctl start postfix
# sudo systemctl enable postfix -
Now we are ready to install GitLab. Run the following command to add the GitLab repository to the system.
# sudo dnf -y install wget
# wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/8/gitlab-ce-15.10.2-ce.0.el8.x86_64.rpm/download.rpm -
Next, install GitLab by running the following command.
# sudo dnf -y install gitlab-ce-15.10.2-ce.0.el8.x86_64.rpm
Configure GitLab
-
Open the GitLab configuration file by running the following command.
# sudo vi /etc/gitlab/gitlab.rb
-
In this file, find the following line.
Replace 'gitlab.example.com' with your server's IP address or domain name. Save the changes and exit the file.external_url 'http://gitlab.example.com'
-
Next, reconfigure GitLab by running the following command.
# sudo gitlab-ctl reconfigure
Access GitLab
- GitLab should now be installed and configured on your Fedora system. To access GitLab, open a web browser and navigate to the "http://<your-server-ip>/users" address or domain name. You should see the GitLab login page.
-
Enter the following details on the GitLab login page.
- Username: root
-
Password: It is stored in the below-mentioned path of the system.
sudo vi /etc/gitlab/initial_root_password
- Copy the password and enter it in the password field of the GitLab login page. You will log in to the application and be redirected to the landing page.
GitLab setup is completed and you can perform all the operations in GitLab.