How to Install GitLab on Ubuntu 18.04 Bionic Beaver

Install GitLab on Ubuntu 18.04

In this article, we will have explained the necessary steps to install and configure GitLab on Ubuntu 18.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

GitLabis an open-source web-based application used for managing Git-repositories for collaborative development. Its main purpose is managing multiple software development projects and its files among members of a team or an organization. It can also provide issue and time tracking, reviews, branching, and many more development-related features that use Git functionality.

Install GitLab on Ubuntu

Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.

Step 2. Installing Required Dependencies.

Install necessary packages in order for GitLab:

Next, run the commands below to install Postfix MTA for notifications:

Step 3. Installing GitLab on Ubuntu 18.04.

Gitlab comes from its own repository. The Gitlab developers wrote a convenient install script for Ubuntu and Debian systems to make the setup simple. Grab the script and run it:

After adding the repository, we can now proceed to download the GitLab CE package:

Step 4. Configuring GitLab.

After a successful installation, we will need to configure our URL to be used by our application.

Now modify the “external_url” variable to utilize your domain.

After that, we will need to set up security measures for our GitLab Server. Paste the following under the “#GitLab Nginx” section to override some settings.

We are then required to run a command to reconfigure GitLab settings:

Step 5. Setting up a Firewall.

Ubuntu’s built-in firewall must be configured to allow three protocols: SSH, HTTP, and HTTPS. To allow the three protocols, execute the following:

Step 6. Configure GitLab through the Web Interface.

Now that you have configured the GitLab URL you can start with the initial configuration through the GitLab web interface. Launch your web browser and navigate to:

That’s all you need to do to install GitLab on Ubuntu 18.04. I hope you find this quick tip helpful. If you have questions or suggestions, feel free to leave a comment below.