How to GitLab on Ubuntu 24.04

This article guides users on installing GitLab on Ubuntu 24.04, highlighting its features as an open-source code repository manager. It outlines prerequisite installations for OpenSSH and an SMTP server, followed by detailed steps to install GitLab and configure it. Users are advised to note the initial password for future access.

This article explains how to install GitLab on Ubuntu 24.04.

GitLab is a web-based git repository manager with issues tracking, continuous integration and deployment (CI/CD), and a wiki.

The Community Edition of GitLab is not just open-source, it’s free and lets you customize it to fit your needs, giving you the freedom to build your DevOps environment as you see fit.

If you’re looking for an open-source code repository for managing software development projects, GitLab is a strong choice, especially when installed on a reliable operating system like Ubuntu.

Install OpenSSH

To install GitLab on Ubuntu, you must have OpenSSH server installed. If you haven’t already done so, read the post below to learn how to install it on Ubuntu.

How to install OpenSSH server on Ubuntu

Once installed, continue below.

Install SMTP server

Another requirement for GitLab is a SMTP server. If you have a SMTP server installed, continue to the next step.

If you don’t already have one, read the post below to learn how to install Postfix MTA server.

How to install Postfix on Ubuntu

Once installed, continue below.

Install GitLab

Now you are ready to install GitLab.

First, install some recommended packages by running the command below.

sudo apt install ca-certificates tzdata perl

Next, run the command below to download the GitLab repository installer.

curl -O https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh
sudo bash ./script.deb.sh

After that, install GitLab by running the command below.

sudo apt update
sudo apt install gitlab-ee

If everything went well, you will get a success message like the one below.

       *.                  *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.



_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __ \
/ /_/ / / /_/ /___/ /_/ / /_/ /
\____/_/\__/_____/\__,_/_.___/


Thank you for installing GitLab!

Configure GitLab next by running the command below.

sudo gitlab-ctl reconfigure

An initial password is stored in [/etc/gitlab/initial_root_password]. Take notes of the temporary password. You will need it later.

Access GitLab

Now that GitLab is installed, you can access the server using its IP address or hostname via any client computer via the web.

Enter the root for username and the initial password in the file.

Login and start using GitLab.

That should do it!

Conclusion:

Installing GitLab on Ubuntu 24.04 provides a robust platform for managing your software development projects. Here are the key takeaways from the installation process:

  • Prerequisites: Ensure that both the OpenSSH server and an SMTP server (like Postfix) are installed before proceeding.
  • Installation Steps: Follow the steps to install necessary packages, download the GitLab repository installer, and install GitLab using the provided commands.
  • Configuration: Remember to run the configuration command to set up GitLab properly after installation.
  • Access: You can access your newly installed GitLab instance via its IP address or hostname in a web browser.
  • Temporary Password: Don’t forget to note down the temporary root password /etc/gitlab/initial_root_password for your first login.

With these steps completed, you can use GitLab effectively for your development needs!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *