安装gitlab

安装gitlab

环境

关闭防火墙以及selinux,起码4核8G 内存至少 3G 不然启动不了

下载环境

gitlab官网:GitLab下载安装_GitLab最新中文基础版下载安装-极狐GitLab

rpm包下载地址: [Yum - Nexus Repository Manager (gitlab.cn)](https://packages.gitlab.cn/#browse/search/yum)(https://packages.gitlab.com/gitlab/gitlab-ce)

可以直接点击上面的连接进行下载rpm包 -- 下面选择对应的版本

shell 复制代码
 yum install -y curl policycoreutils-python openssh-server perl
 yum install gitlab-jh-16.0.3-jh.0.el7.x86_64.rpm -y # 我选择的是 16.0.3  找不到的话直接找个16版本的就可以

初始化

shell 复制代码
# 以下两种方法都可以配置访问地址,第一种需要在yum安装前配置
export EXTERNAL_URL='http://192.168.249.156'
# 或
vim /etc/gitlab/gitlab.rb
external_url 'http://192.168.249.156'  自己的 ip 
# 启动加载配置文件
gitlab-ctl reconfigure

状态

shell 复制代码
gitlab-ctl status
run: gitaly: (pid 4491) 48s; run: log: (pid 4087) 279s
run: gitlab-monitor: (pid 4539) 44s; run: log: (pid 4251) 207s
run: gitlab-workhorse: (pid 4501) 47s; run: log: (pid 4099) 273s
run: logrotate: (pid 4125) 265s; run: log: (pid 4124) 265s
run: nginx: (pid 4112) 271s; run: log: (pid 4111) 271s
run: node-exporter: (pid 4175) 243s; run: log: (pid 4174) 243s
run: postgres-exporter: (pid 4528) 45s; run: log: (pid 4223) 219s
run: postgresql: (pid 3933) 343s; run: log: (pid 3932) 343s
run: prometheus: (pid 4514) 46s; run: log: (pid 4156) 259s
run: redis: (pid 3876) 355s; run: log: (pid 3875) 355s
run: redis-exporter: (pid 4186) 237s; run: log: (pid 4185) 237s
run: sidekiq: (pid 4078) 281s; run: log: (pid 4077) 281s
run: unicorn: (pid 4047) 287s; run: log: (pid 4046) 287s

登陆 Gitlab

用户名: root 密码存放在 /etc/gitlab/initial_root_password 文件中,该文件会在24小时后删除

中文

如图,英文对应的位置 偏好设置 -- 其他版本不一样

里面进行设置,就不演示了

相关推荐
11路没有终点17 小时前
GitLab CI/CD 高级模式实战:include 模板库 / trigger 子流水线 / matrix 并行
ci/cd·gitlab
11路没有终点18 小时前
GitLab CE CI/CD 入门指引手册:从零搭建第一条流水线
ci/cd·gitlab
2501_928996221 天前
Agent 开发的 API 选型:从 Function Calling 到多模型协作的中科热备底层逻辑
服务器·重构·gitlab
何以解忧,唯有..2 天前
Claude Code 常用操作总结
gitlab
GGG7662 天前
K8s1.28 全栈落地|Jenkins+GitLab+Harbor DevOps 流水线封神实战
kubernetes·gitlab·jenkins
Patrick_Wilson3 天前
为什么gitlab的MR会默认有一个merge commit
前端·git·gitlab
极小狐3 天前
极狐GitLab Duo 功能更新:扩展 MCP 工具集、支持 MR 事件触发
运维·gitlab·agent·mr·极狐gitlab·mcp·极狐gitlab duo
2501_928996223 天前
GitLab CVE-2026-19478漏洞解析:Gitaly ref攻击绕过审计与中科热备下的代码资产保护重构
重构·gitlab
秦渝兴4 天前
GitLab CI/CD 流水线实战
ci/cd·gitlab
Ningcode_cloud5 天前
什么是CICD? GitLab + Jenkins 持续集成实战部署手册
运维·ci/cd·云原生·容器·gitlab·jenkins