Installing Gitlab on Linux#
Official documentation link: https://docs.gitlab.com/
Reference blog: https://blog.csdn.net/weixin_56270746/article/details/125427722
1. Install gitlab-ce yum repository#
#/etc/yum.repos.d/gitlab-ce.repo
[gitlab-ce]
name=gitlab-ce
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
gpgcheck=0
Repo_gpgcheck=0
Enabled=1
Gpgkey=https://packages.gitlab.com/gpg.key
2. Install gitlab-ce#
yum install gitlab-ce -y
3. Modify the configuration file#
File location: /etc/gitlab/gitlab.rb
# Repository address
external_url 'http://192.168.100.120:80'
# Modify the custom location of the repository
git_data_dirs({
"default" => {
"path" => "/data/gitlab/git-data"
}
})
4. Reload configuration#
gitlab-ctl reconfigure
View the initial password, default user root
cat /etc/gitlab/initial_root_password