Site icon IT Draft

Установка GitLab CE на Centos 7

Установка GitLab CE на Centos 7

Установка GitLab CE

GitLab — сайт и система управления репозиториями кода для Git. Из дополнительных возможностей: собственная вики и система отслеживания ошибок.

Чуть ранее была рассмотрена статья по переносу GitLab на другой сервер и обновлению GitLab

Добавляем реопзиторий EPEL и обновляемся

[root@localhost]# yum -y install epel-release
[root@localhost]# yum -y update

Устанавливаем необходимый софт

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

Отключаем SELinux

Selectel — ведущий провайдер облачной инфраструктуры и услуг дата-центров

Компания занимает лидирующие позиции на рынке на рынке выделенных серверов и приватных облаков, и входит в топ-3 крупнейших операторов дата-центров в России.


[root@localhost]# setenforce 0
[root@localhost]# nano /etc/selinux/config
SELINUX=disabled

Добавляем правила в файерволл

[root@localhost]# firewall-cmd --permanent --add-service=http
[root@localhost]# firewall-cmd --permanent --add-service=https
[root@localhost]# firewall-cmd --reload

Скачиваем релизную версию GitLab и устанавливаем ее

[root@localhost]# cd /home
[root@localhost]# 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
[root@localhost]# rpm -ivh gitlab-ce-12.1.6-ce.0.el7.x86_64.rpm

Правим конфиг gitlab.rb

[root@localhost]# nano /etc/gitlab/gitlab.rb
[root@localhost]# grep -v "^#\|^$" /etc/gitlab/gitlab.rb
 external_url 'http://gitlab.itdraft.ru'
 gitlab_rails['gitlab_email_enabled'] = true
 gitlab_rails['gitlab_email_from'] = 'admin@itdraft.ru'
 gitlab_rails['gitlab_email_display_name'] = 'Admin'
 gitlab_rails['gitlab_email_reply_to'] = 'admin@itdraft.ru'
 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'] = 'admin@itdraft.ru'
 gitlab_rails['smtp_authentication'] = "login"
 gitlab_rails['smtp_enable_starttls_auto'] = true
 gitlab_rails['smtp_tls'] = false
 gitlab_rails['smtp_openssl_verify_mode'] = 'peer'

Генерируем конфиг и запускаем gitlab

[root@localhost]# sudo gitlab-ctl reconfigure
[root@localhost]# sudo gitlab-ctl start

Открываем gitlab в браузере и задаем новый пароль для пользователя root

Exit mobile version