Linux 安装 Gitlab#
官网文档地址:https://docs.gitlab.com/
参考博客:https://blog.csdn.net/weixin_56270746/article/details/125427722
一、安装 gitlab-ceyum 源#
#/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
二、安装 gitlab-ce#
yum install gitlab-ce -y
三、修改配置文件#
文件位置 /etc/gitlab/gitlab.rb
#仓库地址
external_url 'http://192.168.100.120:80'
#修改仓库自定义位置
git_data_dirs({
"default" => {
"path" => "/data/gitlab/git-data"
}
})
四、重载配置#
gitlab-ctl reconfigure
查看初始化密码,默认用户 root
cat /etc/gitlab/initial_root_password