Home > Article > Development Tools > Detailed steps to build Gitlab on centos (share)
With the continuous development of software development, code version control has become an essential tool for any software development team. As a free, open source, easy to install and manage code management platform, Gitlab has been widely used in various development teams. This article will introduce the detailed steps to build Gitlab on CentOS system.
Preparation work
Before starting to install Gitlab, we need to prepare the following work:
Install Gitlab
First we need to add the yum source of Gitlab in order to use the yum command to install Gitlab.
$ sudo curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
After the addition is successful, we can use yum to install Gitlab.
$ sudo yum install gitlab-ce
After installing Gitlab, we need to execute the following command to configure the access address and port of Gitlab :
$ sudo vi /etc/gitlab/gitlab.rb
In the opened file, find the following two lines:
Change the address of external_url to the public IP address, as follows:
external_url 'http:// 192.168.1.100'
Configure listen_network to unix, and modify listen_addr to unix:/var/opt/gitlab/gitlab-workhorse/socket.
gitlab_workhorse['listen_network'] = 'unix'
gitlab_workhorse['listen_addr'] = "unix:/var/opt/gitlab/gitlab-workhorse/socket"
After completing the configuration, we need to restart Gitlab for the configuration to take effect.
$ sudo gitlab-ctl reconfigure
Now we can use the browser to access Gitlab, the address is http://{{ ip_address}}. After successful access, you can start using Gitlab for code version management.
Summary
This article briefly introduces the detailed steps on how to build Gitlab on CentOS system. It should be noted that when actually using Gitlab, we need to further configure Gitlab's user permissions, HTTPS certificate, etc. to meet the specific needs of the team. I hope this article can be helpful to everyone.
The above is the detailed content of Detailed steps to build Gitlab on centos (share). For more information, please follow other related articles on the PHP Chinese website!