Gitlab 安装
1. 最新版本的gitlab下载,清华大学开源镜像
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/
注意 ce 版本是社区版,ee 版本是企业版
下载
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-14.1.1-ce.0.el8.x86_64.rpm
# 如果失败请用 Ctrl + z,再执行如下命令
wget -c https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-14.1.1-ce.0.el8.x86_64.rpm
2. 安装gitlab
# 安装依赖
yum install -y curl policycoreutils-python openssh-server
# 检查sshd
systemctl enable sshd
systemctl start sshd
systemctl status sshd
# 安装gitlab
rpm -i gitlab-ce-14.1.1-ce.0.el8.x86_64.rpm
3. 修改默认端口
vim /etc/gitlab/gitlab.rb
external_url 'http://116.62.233.13:9000'
4. 修改默认root密码
gitlab-rails console -e production
User.where(id:1).first
user.password='xxxx'
user.save!
5. 重载配置和重启
gitlab-ctl reconfigure
gitlab-ctl restart