How do you install GitLab on Ubuntu?
To install GitLab on Ubuntu, you can follow these steps:
- Update the system software package: Open the terminal and run the following command:
sudo apt update
sudo apt upgrade
- Install dependencies: GitLab requires some dependencies to run, use the following command to install them:
sudo apt install curl openssh-server ca-certificates
- To add the GitLab software source: running the following command will add the GitLab software source to your system:
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
- Install GitLab by running the following command:
sudo apt install gitlab-ee
During the installation process, you will be prompted to set up GitLab’s external URL. Enter the necessary URL as needed, and then proceed with the installation.
- Configure GitLab: After installation is complete, you can use the following command to reconfigure GitLab:
sudo gitlab-ctl reconfigure
This will involve the necessary configuration and starting of the GitLab service.
After installation is complete, you can access GitLab’s web interface by visiting the external URL that was set up in your browser. When accessing it for the first time, you will be prompted to set an admin password.
Please note that the default installation is GitLab Enterprise Edition (GitLab-EE). If you want to install the Community Edition (GitLab-CE), simply change “gitlab-ee” to “gitlab-ce” in the command in step 3.