【Linux】Rocky Linux 清华镜像源安装 GitLab
使用清华镜像源安装 GitLab
地址:清华镜像源
1. 搜索 gitlab,我们选择 gitlab-ce 社区版进行安装
2. 新建 /etc/yum.repos.d/gitlab-ce.repo,内容为
注意:el$releasever 是清华镜像源内的文件夹版本
[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/
gpgcheck=0
enabled=1
3. 通过 yum 命令安装
yum makecache
yum install gitlab-ce
4. 安装完成后,打开 /etc/gitlab/gitlab.rb,然后修改其中的 external_url 为虚拟机 ip 地址
5. 启动 gitlab
sudo gitlab-ctl reconfigure
启动成功后,初始的登录账户是 root,登录密码在 /etc/gitlab/initial_root_password,24时后初始密码会失效,登陆后先重置一下
cat /etc/gitlab/initial_root_password
防火墙放行80端口,重新加载防火墙规则
sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --reload
6. 查看 gitlab 启动状态
sudo systemctl status gitlab-runsvdir