GitLab is an open source platform for code management and collaboration. It provides a series of functions such as source code management, issue tracking, CI/CD, etc., to make team collaboration more efficient. The latest version is GitLab 13.x. This article will introduce how to install GitLab on CentOS.
Prerequisites for installing GitLab:
1. You need a server running CentOS (CentOS 7 or higher, 64-bit is recommended)
2. Make sure the server has curl installed
3. Make sure the necessary packages and dependencies to run GitLab are installed on the server
Here are the steps to install GitLab on CentOS:
Run the following command to install the necessary dependencies and packages on your CentOS server:
sudo yum install -y curl policycoreutils-python openssh-server sudo systemctl enable sshd sudo systemctl start sshd sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld
Use the following command to download and install the GitLab repository:
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
Run the following command to install GitLab CE :
sudo EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ce
*Note: Please note to replace http://gitlab.example.com with the actual URL
Installation successful After that, start GitLab using the following command:
sudo gitlab-ctl reconfigure
You will be asked to set the root password on the GitLab page, and you can access GitLab through the following address:
http://Your_Server_IP_or_Hostname
If your GitLab needs to use the Docker function, you can execute the following commands in order to install docker :
sudo yum install -y yum-utils device-mapper-persistent-data lvm2 sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo sudo yum install docker-ce docker-ce-cli containerd.io sudo systemctl start docker sudo systemctl enable docker
7. Complete
At this point, you have successfully installed GitLab on CentOS. Code management and collaboration can now be carried out through GitLab, improving team efficiency.
The above is the detailed content of How to install GitLab on CentOS. For more information, please follow other related articles on the PHP Chinese website!