The /etc/services file provides port mapping protocols for HTTP and HTTPS, so we can allow this traffic by name. Because we will use GitLab to request and enable free TLS/SSL certificates from Let's Encrypt, we also allow HTTPS access. Since GitLab is a web application, we should allow HTTP access. Type the following to view the current status of the active firewall: sudo ufw statusĪs you can see, the current rules allow SSH traffic to pass, but access to other services is restricted. If you follow the guide linked in the prerequisites, the ufw firewall will be enabled. Step 3-Adjust firewall rulesīefore configuring GitLab, you need to ensure that the firewall rules are loose enough to allow web traffic.
This will install the necessary components on your system. Once you are done, you can install the actual GitLab application using the following apt command: sudo apt install gitlab-ce This allows you to manage GitLab using the same package management tools as other system packages. This script will set up your server to use the repository maintained by GitLab. Once you are satisfied with the security of the script, run the installer: sudo bash /tmp/ You can also find the hosted version of the script here: less /tmp/
This is a simple process that uses an installation script to configure the system using the GitLab repository.Įnter the /tmp directory and download the installation script: cd /tmpįeel free to check the downloaded script to make sure you are satisfied with the required operation. Now that the dependencies are in place, we can install GitLab ourselves. On the next screen, enter the domain name of the server to configure how the system sends mail. For the installation of postfix, please select " Internet Site" when prompted.
You may already have some of this software installed. Sudo apt install ca-certificates curl openssh-server postfix
Since this is the first time we use apt during this session, we can refresh the local package index and then type the following to install the dependencies: sudo apt update Fortunately, all the necessary software can be easily installed from Ubuntu's default package repository. For this guide, we assume that you have at least the above resources.īefore we install GitLab ourselves, it is very important to install some software that we continue to use during the installation process. Released GitLab hardware requirements recommends using the server:Īlthough you can obtain RAM by replacing some swap space, it is not recommended. Students who don’t have a server can buy it from here, but I personally recommend you to use the free Tencent Cloud Developer Lab for experimentation, and then buy server. An Ubuntu 18.04 server, an Ubuntu** server** with a non-root account that can use the sudo command, and the firewall is turned on.
In this guide, we will introduce how to install and configure GitLab on an Ubuntu 18.04 server. The GitLab project uses a simple installation mechanism to set up a GitLab instance on your own hardware. It is designed to use your own infrastructure for hosting, and to provide your development team with the flexibility to deploy internal repositories, a public way to interact with users, or to provide contributors with a way to host their own projects. The apt update command updates the package index files used by the apt utility to retrieve information on available packages.GitLab CE or Community Edition is an open source application mainly used to host Git repositories and other development-related functions such as issue tracking. Open your terminal and run the apt update command below to ensure your system has access to all the latest software updates.