gitlab2024最新版安装

系统:redhat9.0

gitlab版本:gitlab-ce-16.10.7-ce.0.el9.x86_64.rpm

安装组件&包依赖:https://packages.gitlab.com/gitlab/gitlab-ce/packages/ol/9/gitlab-ce-16.10.7-ce.0.el9.x86_64.rpm

参考:

前提:

  1. 下载gitlab rpm包:wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ol/9/gitlab-ce-16.10.7-ce.0.el9.x86_64.rpm/download.rpm
  2. 配置好对应的yum源,并生成对应的缓存(dnf clean all && dnf makecache)
1、基础服务的启用与放行

# 启用并启动 SSH 服务

  systemctl enable sshd
  systemctl start sshd

# 配置防火墙以允许 HTTP 和 HTTPS 服务

  firewall-cmd --permanent --add-service=http
  firewall-cmd --permanent --add-service=https
  systemctl reload firewalld
2、安装

# 添加 GitLab 仓库并安装必要的依赖(没有curl命令的话还要提前yum安装以下 yum install -y curl)
  curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash 

# 安装必要的依赖包(官网有说明)
  yum install -y openssh-server perl policycoreutils-python-utils

# 安装 libsemanage(selinux,如果不安装的话gitlab-ctl reconfigure初始化会报错))
 yum install -y libsemanage

# 安装并配置 Postfix 邮件服务
  yum install -y postfix
  systemctl enable postfix
  systemctl start postfix

# 安装 GitLab
  yum install gitlab-ce-16.10.7-ce.0.el9.x86_64
3、配置gitlab相关信息
#配置gitlab对外的提供的url
[root@labhub opt]# cat  /etc/gitlab/gitlab.rb | grep ^external_url
external_url 'http://gitlab.server.com'

[root@labhub opt]# vim /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml.example 
  gitlab:
    host: gitlab.server.com
    port: 80
    https: false
[root@labhub opt]# mv /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml.example /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
#初始化,并开启服务
gitlab-ctl reconfigure
gitlab-ctl start
获取root用户名默认密码,然后web页面修改密码
cat /etc/gitlab/initial_root_password (该文件24小时有效,过期删除)
Password: DW4FGpgEQ1pYzLFFf6vJmdNn+0Blk+7xgbwnxXw9LPU=

浏览器:http://gitlab.server.com登录

  • 13
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值