For installing Gitlab, we need minimum requirements of 2.5GB space and 4cores CPU. If you have that, let's jump into the installation part.
sudo yum install -y curl policycoreutils-python openssh-server perl
Enable OpenSSH server daemon if not enabled: sudo systemctl status sshd
sudo systemctl enable sshd
sudo systemctl start sshd
Check if opening the firewall is needed with: sudo systemctl status firewalld
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo systemctl reload firewalld
Install Postfix to send notification emails
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix
Create Gitlab repo in your local server
sudo vi /etc/yum.repos.d/gitlab.repo
Copy paste the below contents
[gitlab_gitlab-ee]
name=gitlab_gitlab-ee
baseurl=https://packages.gitlab.com/gitlab/gitlab-ee/el/8/$basearch
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey
https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey/gitlab-gitlab-ee-D645A26AB9FBD22.pub.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
[gitlab_gitlab-ee-source]
name=gitlab_gitlab-ee-source
baseurl=https://packages.gitlab.com/gitlab/gitlab-ee/el/8/SRPMS
repo_gpgcheck=0
gpgcheck=1
enabled=0
gpgkey=https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey
https://packages.gitlab.com/gitlab/gitlab-ee/gpgkey/gitlab-gitlab-ee-D645A26AB9FBD22.pub.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300
Then run,
sudo yum install gitlab_gitlab-ee
Once it is done, Gitlab will be installed in your server To access it using 443 port securely, configure external URL
sudo vi /etc/gitlab/gitlab.rb
external_url "https://yourgitlab.com"
Then fire,
sudo gitlab-ctl reconfigure
Check in yourgitlab.com