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登录

相关推荐
FlightYe6 小时前
linux系统编程(八):阻塞与非阻塞IO对比
android·linux·运维·服务器·github·vim
xian_wwq6 小时前
【学习笔记】Loop Engineering,从手动提示到目标驱动自动化-13/16
笔记·学习·自动化
淮北4946 小时前
ubuntu22 默认输入法调整频率
运维·服务器·git·ubuntu·elasticsearch
Percep_gan6 小时前
切割服务器日志
运维·服务器
骇客野人7 小时前
阿里云运维手册(通用生产版|云上运维标准化文档)
运维·阿里云·云计算
雾时之林7 小时前
Linux---计算机网络常见面试题
linux·运维·计算机网络
维核科技7 小时前
多卡集群频繁裂卡、通信报错?NVLink故障排查与运维优化方案
运维·服务器维修·gpu维修·算力卡维修·gpu故障·算力卡故障·服务器故障
Promise微笑8 小时前
红外热像仪选型:3~5μm中波与8~14μm长波探测机理解析
运维
承渊政道8 小时前
飞牛NAS部署Immich:搭建家庭相册并实现远程访问
运维·服务器·docker·内网穿透·cpolar·nas·immich
ii_best8 小时前
iOS 投屏ios群控鹰眼中控系统安装指南|电脑端 + TestFlight + 开发者模式实操
ios·自动化·按键精灵