GitLab (Git-repository manager), an open-source version control platform similar to GitHub, is robust, scalable and a great alternative to GitHub.
GitLab has rich features like issues and time tracking, repository branching, file locking, tagging, merging, and many other features that you will find in a typical source control platform.
GitLab streamlines your collaborative workflows. Visualize, prioritize, coordinate, and track your progress your way with GitLab’s flexible project management tools.
This brief tutorial is going to show students and new users how to easily install GitLab on Ubuntu 16.04 / 17.10 and 18.04.
To install GitLab on Ubuntu, follow the steps below
Install Required Packages
Before installing GitLab, you must make sure Ubuntu is ready. that means, installing the necessary packages for GitLab to function. To do that, run the commands below.
sudo apt update sudo apt install curl openssh-server ca-certificates
Next, run the commands below to install Postfix MTA for notifications.
sudo apt install postfix
During the installation, you’ll be prompted to select the type of mail configuration. make sure to choose Internet Site [ Mail is sent and received directly using SMTP] as shown below. then press Enter to continue.
Next, provide a mail server name. then can be the server Postfix is installed on.
Install GitLab Packages
Now that your server is ready, run the commands below to download and install GitLab packages. the EXTERNAL_URL value should be the URL for the GitLab site. If you’re testing in a development environment, you may have to enter that in the server host file.. and this is the URL that you’ll need to access the GitLab site.
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash EXTERNAL_URL="http://gitlab.example.com" sudo apt install gitlab-ce
After the commands above you should see a completion message.
Thank you for installing GitLab! GitLab was unable to detect a valid hostname for your instance. Please configure a URL for your GitLab instance by setting `external_url` configuration in /etc/gitlab/gitlab.rb file. Then, you can start your GitLab instance by running the following command: sudo gitlab-ctl reconfigure
Run the commands below to start the GitLab instance.
sudo gitlab-ctl reconfigure
By default, the Ubuntu firewall is disabled. if you enabled it, it then run the commands below to allow HTTP and HTTPS traffic.
sudo ufw allow 80/tcp sudo ufw allow 443/tcp
After that, open your browser and browse the URL for your GitLab instance. You should see the GitLab setup page as shown below. Change the admin account immediately. and you should be redirected to the login screen.
That’s it! This is how to get GitLab installed on Ubuntu systems. more advanced settings can come after, but this is the bare minimum to get GitLab started.
The default username is the root
You may also like the post below: