Install Gitlab Community Edition on Centos 7

Install Gitlab Community Edition on Centos 7/ Install Gitlab Enterprise Edition on Centos 7

Gitlab is a Git-Repository and it is a web-based complete DevOps life cycle tool. Gitlab is an application of complete software development life cycle. Gitlab is used for Source code management, project planning, monitoring and security. Gitlab is similar product as Atlassian Stash/Bitbucket.

Gitlab community edition is an open source software. The advantage of Gitlab community edition is that it is behave same as Gitlab enterprise edition without license. The disadvantage of Gitlab community edition is that it is not contain proprietary code.

We will install Gitlab community edition on CentOS 7 that is host in VMware ESXI 6.7. The specifications of this virtual machine are as follows, you can change the specifications as per your requirement.

RAM: 6GB.
CPU: 4.
Storage: 100GB.
NIC: 1.

how to install gitlab community edition on centos 7


Installation of CentOS 7 click on >>Read

To update CentOS 7 type the below command.

yum update -y

how to install gitlab community edition on centos 7

The CentOS 7 update has successfully completed.

how to install gitlab community edition on centos 7

Edit the file "hosts" that available in directory "/etc/hosts" by use of vi editor.

vi /etc/hosts

how to install gitlab community edition on centos 7

Edit the below line in file "hosts".

172.16.1.55  git.domain.com git

how to install gitlab community edition on centos 7

To install the net-tools type the below command.

yum -y install net-tools

how to install gitlab community edition on centos 7

Due to CentOS 7 update net-tools has already installed.

To install the policycoreutils, openssh-server and openssh-clients type the below command.

yum install curl policycoreutils openssh-server openssh-clients

how to install gitlab community edition on centos 7

Due to CentOS 7 update policycoreutils, openssh-server and openssh-clients has already installed.

To install policycoreutils-python type the below command.

yum install -y curl policycoreutils-python

how to install gitlab community edition on centos 7

policycoreutils-python package has successfully installed.

how to install gitlab community edition on centos 7

Disable the firewall and SELinux:

Firewall and SElinux should be disabled. if you want to enable firewall and SELinux, must allow the require ports of Gitlab in firewall and set the boolean values of SELinux that require for GITLAB.

To stop and disable the firewall "firewalld" type the below command.

systemctl stop firewalld
systemctl disable firewalld

how to install gitlab community edition on centos 7

Check the status of firewall "firewalld" type the below command.

systemctl status firewalld

how to install gitlab community edition on centos 7

To disable the SELinux permanently edit the SELinux config file that available in directory "/etc/selinux/config"  by use of vi editor.

vi /etc/selinux/config

how to install gitlab community edition on centos 7

Set SELINUX=disabled as mention in the below image.


Install the Postfix package for emailing purpose type the below command.

yum install postfix -y

installation of gitlab community edition on centos 7

Due to CentOS 7 update Postfix package has already installed.

To enable and start the Postfix service type the below command.

systemctl enable postfix
systemctl start postfix

installation of gitlab community edition on centos 7

To check the status of Postfix service type the below command.

systemctl status postfix

installation of gitlab community edition on centos 7

To download the Gitlab script from Gitlab repository type the below command. This command download the script of Gitlab community edition.

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

To download the script of Gitlab enterprise edition type the below command.

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash

The installation of Gitlab Community Edition and Gitlab Enterprise Edition are same, the only difference is the downloaded script.

how to install gitlab community edition on centos 7

Gitlab Community Edition script has successfully downloaded.

installation of gitlab community edition on centos 7

To install the Gitlab community edition type the below command.

installation of gitlab community edition on centos 7

Gitlab Community Edition has successfully installed.

installation of gitlab community edition on centos 7

After the successful installation of Gitlab it gives the little information to open the Gitlab web page on browser that must set the External URL then start the Gitlab instance. 

To set the External URL Type the below command.

EXTERNAL_URL=http://git/

installation of gitlab community edition on centos 7

git is the hostname of Gitlab server, you can set the Full Qualified Domain Name "FQDN" for example: git.domain.com. The command is mention below.

EXTERNAL_URL=http://git.domain.com/

After set the External URL start the Gitlab instance, Type the below command. 

gitlab-ctl reconfigure

installation of gitlab community edition on centos 7

Gitlab instance has successfully start.

installation of gitlab community edition on centos 7

To open the web page of Gitlab type the below URL on browser.

http://git

Set the root password before login.

installation of gitlab community edition on centos 7

Sign in with root user and password for further configurations. 

installation of gitlab community edition on centos 7

Now you can Create a project, Create a group, Add people, Configure Gitlab and many more.

installation of gitlab community edition on centos 7


Thanks for read this Article

Comments