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)
bash 复制代码
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
bash 复制代码
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
bash 复制代码
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
bash 复制代码
#初始化,并开启服务
gitlab-ctl reconfigure
gitlab-ctl start
bash 复制代码
获取root用户名默认密码,然后web页面修改密码
cat /etc/gitlab/initial_root_password (该文件24小时有效,过期删除)
Password: DW4FGpgEQ1pYzLFFf6vJmdNn+0Blk+7xgbwnxXw9LPU=

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

相关推荐
likfishdn5 分钟前
Linux的文件与目录管理
linux·运维·服务器
2501_9032386516 分钟前
Git Bash:Windows下的强大命令行工具
windows·git·bash·个人开发
chian-ocean25 分钟前
Linux 文件缓冲区:高效数据访问的幕后推手
linux·运维·服务器
加油=^_^=27 分钟前
【Linux】进程优先级 | 进程调度(三)
linux·运维·服务器
元气满满的热码式1 小时前
Docker数据卷操作实战
linux·运维·docker·云原生·容器
北京耐用通信1 小时前
航空装配自动化神器Ethercat转profient网关搭配机器人精准控制
运维·机器人·自动化
吃汤圆的抹香鲸2 小时前
Rider 安装包 绿色版 Win/Mac/Linux 适合.NET和游戏开发者使用 2025全栈开发终极指南:从零配置到企业级实战
linux·运维·windows·sql·游戏·macos·.net
神明木佑2 小时前
datalist 是什么?以及作用是什么?
git
那片海还在吗4 小时前
使用 Git、Postman、Newman、Jenkins 与邮件构建自动化接口测试及通知流程
git·jenkins·postman
崔lc4 小时前
linux中安装部署Jenkins,成功构建springboot项目详细教程
运维·jenkins