GitLab is an open source app that mostly is used in order to host Git repositories. It also give your additional features such as issue tracking. It is developed to use your own infrastructure, it’s flexible to deploy as an internal repository store for your dev team. The Gitlab project makes the procedure of installing Gitlab pretty much straight forward. Here you will see how can you install it in an Ubuntu 16.04 server, step by step.
How to install Gitlab on Ubuntu 16.04, a step-by-step guide:
First things first, you’re going to need the following:
1)Ubuntu 16.04 server
2)At least 2 cores of CPU
- At least 2GB of Ram
How to install the Dependencies
Since Ubuntu’s default package provides us with all the software we require from its depositories we’re ready to install dependencies:
For the “postfix” installation, select “Internet Site”.
How to install GitLab
Since you successfuly installed the dependencies, now you can install GitLab. First move into the /tmp directory, and download the following:
Here you can find a hosted version of the script
Then, run the installer
After the installation is complete, then the actual GitLab application is ready to be installed with “apt:”
You can’t use the application yet, because yo need to run also an initial configuration command:
How to adjust the Firewall rules
This is needed to be done before you access GitLab for first time.
See current status of your firewall:
So here, you can see that SSH traffic is allowed but there are some restrictions to other services. You need to allow HTTP access in because GitLab happens to be a web application. The protocol to port mapping for HTTP can be found in the /etc/services file. If you have not enabled OpenSSH traffic already then your should do that by typing:
Check ufw status command once more to see if access is given to at least these 2 services:
If everything is done correctly now you can access GitLabs web interface.