随笔- 136  文章- 0  评论- 8  阅读- 26万 

Centos8 中安装GitLab

1,安装依赖

1
yum install -y curl policycoreutils-python openssh-server

centos8没有policycoreutils-python yum源,不用管

2,启动ssh并设置为开机自启动

1
2
3
systemctl enable sshd
 
systemctl start sshd

 

3,添加http服务到firewalld,pemmanent表示永久生效,若不加--permanent系统下次启动后就会失效

1
2
3
systemctl start firewalld
 
firewall-cmd --permanent --add-service=httpfirewall-cmd --permanent --add-service=httpssystemctl reload firewalld

 

4,启动postfix

1
2
3
systemctl enable postfix
 
systemctl start postfix

 

5,下载gitlab

1
去这个路径下找最新的: https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8 ; 下面的命令对应也跟着修改
1
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-12.10.1-ce.0.el8.x86_64.rpm

 

6,安装

1
rpm -i gitlab-ce-12.10.1-ce.0.el8.x86_64.rpm

 


成功如图:

7,编辑ip和端口

 

1
2
3
4
5
vim /etc/gitlab/gitlab.rb
 
gitlab-ctl reconfigure
 
gitlab-ctl restart

 

8,访问gitlab ip+端口
如果输入端口和ip一直无法响应,可以关闭防火墙
systemctl stop firewalld

如果访问502,查看

https://www.cnblogs.com/fuhua/p/15414744.html

 


重新配置并启动

gitlab-ctl reconfigure

gitlab-ctl restart
开启:
gitlab-ctl start
关闭:
gitlab-ctl stop

9,成功如图:

10,第一次登录需要修改root密码, 密码8位以上,修改完就可以登录
使用设置的新密码,登录

其他操作类似添加账号,仓库等等自己百度

 posted on   wu小强  阅读(1112)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
点击右上角即可分享
微信分享提示