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.
Installation of CentOS 7 click on
>>ReadTo update CentOS 7 type the below command.
yum update -y
The CentOS 7 update has successfully completed.
Edit the file
"hosts" that available in directory
"/etc/hosts" by use of vi editor.
Edit the below line in file "hosts".
172.16.1.55 git.domain.com git
To install the net-tools type the below command.
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
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
policycoreutils-python package has successfully installed.
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
Check the status of firewall "firewalld" type the below command.
systemctl status firewalld
To disable the SELinux permanently edit the SELinux config file that available in directory "/etc/selinux/config" by use of vi editor.
Set SELINUX=disabled as mention in the below image.
Install the Postfix package for emailing purpose type the below command.
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
To check the status of Postfix service type the below command.
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.
Gitlab Community Edition script has successfully downloaded.
To install the Gitlab community edition type the below command.
Gitlab Community Edition has successfully installed.
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.
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 instance has successfully start.
To open the web page of Gitlab type the below URL on browser.
Set the root password before login.
Sign in with root user and password for further configurations.
Now you can Create a project, Create a group, Add people, Configure Gitlab and many more.
Thanks for read this Article
Comments
Post a Comment