1. Download
Index of/gitlab ce/yum/el7/| Tsinghua University Open Source Software Mirror Station | Tsinghua Open Source Mirror
Download the latest version of gitlab-ce-15.4.2-ce.0.el7.x86_ sixty-four
2. Install basic dependencies and start
#Installation dependencies
yum install -y curl policycoreutils-python openssh-server postfix
#Configure Boot
systemctl enable sshd
systemctl enable postfix
#Start SSH and postfix
systemctl start sshd
systemctl start postfix
one
two
three
four
five
six
seven
eight
3. Install gitlab
rpm -ivh gitlab-ce-15.4.2-ce.0.el7.x86_ 64.rpm
The default installation path is/opt/gitlab/, and the path for saving program data and configuration files is/var/opt/gitlab. The following is the directory for the important components of gitlab:
Code repository storage location:/var/opt/gitlab/git data/repositories/
Code repository backup location:/var/opt/gitlab/backups/
PostgreSQL data and configuration directory:/var/opt/gitlab/postgreSQL/data/
Redis default configuration directory:/var/opt/gitlab/Redis
Gitlab main configuration file:/etc/gitlab/gitlab.rb
4. Modifying Configuration Files
vim /etc/gitlab/gitlab.rb
external_ url ' http://192.168.47.135:8088 '
gitlab_ rails['time_zone'] = 'Asia/Shanghai'
#Mail Configuration
gitlab_ rails['smtp_enable'] = true
gitlab_ rails['smtp_address'] = 'smtp.exmail.qq.com'
gitlab_ rails['smtp_port'] = 465
gitlab_ rails['smtp_user_name'] = ' yourmail@qq.com '
gitlab_ rails['smtp_password'] = 'yourpasswd'
gitlab_ rails['smtp_domain'] = 'exmail.qq.com'
gitlab_ rails['smtp_authentication'] = 'login'
gitlab_ rails['smtp_enable_starttls_auto'] = true
gitlab_ rails['smtp_tls'] = true
gitlab_ rails['gitlab_email_enabled'] = true
gitlab_ rails['gitlab_email_from'] = ' yourmail@qq.com '
gitlab_ rails['gitlab_email_display_name'] = 'Gitlab'
#Disable user groups
gitlab_ rails['gitlab_default_can_create_group'] = false
one
two
three
four
five
six
seven
eight
nine
ten
eleven
twelve
thirteen
fourteen
fifteen
sixteen
seventeen
eighteen
nineteen
twenty
twenty-one
After modification, execute: gitlab-ctl reconfigure
The first execution took a relatively long time
#Other commonly used commands
sudo gitlab-ctl start
sudo gitlab-ctl stop
sudo gitlab-ctl restart
5. Open firewall
sudo firewall-cmd --zone=public --add-port=8088/tcp --permanent && sudo firewall-cmd --reload
6. Accessing web pages
————————————————
Copyright Notice: This article is the original work of CSDN blogger "BYAPESS" and follows the CC 4.0 BY-SA copyright agreement. Please attach the original source link and this statement when reprinting.
Original link: https://blog.csdn.net/Bzbtyhydcxy/article/details/129020676