搭建gitlab

1.防火墙开启http

# 添加http命令
sudo firewall-cmd --permanent --add-service=http
# 重启防火墙
sudo systemctl reload firewalld

2.安装Postfix邮件服务

# 安装
sudo yum install postfix
# 设置为开机自启动
sudo systemctl enable postfix
# 启动
sudo systemctl start postfix

3.安装GitLab

# 添加镜像
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.0.0-ce.0.el7.x86_64.rpm
# 安装
rpm -i gitlab-ce-15.0.0-ce.0.el7.x86_64.rpm

如果遇到下面这个问题

 

yum install policycoreutils-python  /sudo yum install -y curl policycoreutils-python openssh-server

# 将SSH服务设置成开机自启动
sudo systemctl enable sshd
# 启动SSH服务
sudo systemctl start sshd

4.修改配置文件

# 修改配置文件
vim /etc/gitlab/gitlab.rb     ip+端口号

 

 

 5.开放端口

# 开放端口,端口号随意
firewall-cmd --zone=public --add-port=端口号/tcp --permanent

#刷新防火墙
firewall-cmd --reload

6.启动gitlab

gitlab-ctl reconfigure
gitlab-ctl restart 重启

gitlab-ctl stop 停止服务

gitlab-ctl start 启动

gitlab-ctl status 查看状态

6.gitLab升级

1.备份当前gitlab

gitlab-rake gitlab:backup:create

2.配置yum源

vim  /etc/yum.repos.d/gitlab-ce.repo

#其中baseurl是镜像地址

 #[gitlab-ce]

name=Gitlab CE Repository 

baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/

gpgcheck=0 

enabled=1

3.升级

yum install gitlab-ce-版本号

posted on   棽犹  阅读(47)  评论(0编辑  收藏  举报

(评论功能已被禁用)
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示