centos8安装GitLab

1、安装依赖(centos8没有policycoreutils-python yum源,不用管)

yum install -y curl policycoreutils-python openssh-server

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

systemctl enable sshd

systemctl start sshd

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

systemctl start firewalld

firewall-cmd --permanent --add-service=http

systemctl reload firewalld

4、启动postfix

systemctl enable postfix

systemctl start postfix

5、下载GitLab 社区版

版本选择可以从清华大学开源软件镜像站上下载:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/(el8:表示centos8系统,el7:表示centos7系统,el6:表示centos6系统)

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-12.10.1-ce.0.el8.x86_64.rpm

6、安装

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

成功如图:

7、编辑ip和端口

vim /etc/gitlab/gitlab.rb

external_url 填写你的服务器公网ip,后面加端口号

gitlab-ctl reconfigure

gitlab-ctl restart

8、访问gitlab ip+端口

如果输入端口和ip一直无法响应,可以关闭防火墙

systemctl stop firewalld

如果访问出现提示502错误,一般是因为

1、机器内存太小,最小需要4G内存

2、端口号被占用

解决方法查看:https://www.cnblogs.com/stronger-xsw/p/12804002.html

如果是因为内存问题可查看我的这篇文章:https://blog.csdn.net/qq_23375733/article/details/115839497?spm=1001.2014.3001.5501

重新配置并启动

gitlab-ctl reconfigure

gitlab-ctl restart

# 开启 gitlab-ctl start
# 关闭 gitlab-ctl stop

9、成功如图

10、第一次登录需要先注册,密码在8位以上,注册完就可以登录

11、语言设置为:简体中文

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值