Installing GitLab CE on Centos 7

GitLab is a site and code repository management system for Git. Additional features: own wiki and bug tracking system.

Earlier, I reviewed an article on migrating GitLab to another server and updating GitLab

Add EPEL reoption and update

[[email protected]]# yum -y install epel-release
[[email protected]]# yum -y update

Installing the necessary software

[[email protected]]# yum -y install curl openssh-server openssh-clients postfix policycoreutils-python mc nano wget htop git rsync p7zip ntpdate

Disable SELinux

[[email protected]]# setenforce 0
[[email protected]]# nano /etc/selinux/config
SELINUX=disabled

Adding rules to the firewall

[[email protected]]# firewall-cmd --permanent --add-service=http
[[email protected]]# firewall-cmd --permanent --add-service=https
[[email protected]]# firewall-cmd --reload

Download the release version of GitLab and install it

[[email protected]]# cd /home
[[email protected]]# wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-12.1.6-ce.0.el7.x86_64.rpm/download.rpm
[[email protected]]# rpm -ivh gitlab-ce-12.1.6-ce.0.el7.x86_64.rpm

Editing the gitlab.rb config

[[email protected]]# nano /etc/gitlab/gitlab.rb
[[email protected]]# grep -v "^#|^$" /etc/gitlab/gitlab.rb
 external_url 'http://gitlab.itdraft.ru'
 gitlab_rails['gitlab_email_enabled'] = true
 gitlab_rails['gitlab_email_from'] = '[email protected]'
 gitlab_rails['gitlab_email_display_name'] = 'Admin'
 gitlab_rails['gitlab_email_reply_to'] = '[email protected]'
 gitlab_rails['smtp_enable'] = true
 gitlab_rails['smtp_address'] = "smtp.itdraft.ru"
 gitlab_rails['smtp_port'] = 465
 gitlab_rails['smtp_user_name'] = "admin"
 gitlab_rails['smtp_password'] = "%password%"
 gitlab_rails['smtp_domain'] = "itdraft.ru"
 gitlab_rails['gitlab_email_from'] = '[email protected]'
 gitlab_rails['smtp_authentication'] = "login"
 gitlab_rails['smtp_enable_starttls_auto'] = true
 gitlab_rails['smtp_tls'] = false
 gitlab_rails['smtp_openssl_verify_mode'] = 'peer'

Generate config and run gitlab

[[email protected]]# sudo gitlab-ctl reconfigure
[[email protected]]# sudo gitlab-ctl start

Open gitlab in a browser and set a new password for the root user

Sidebar