gitlab部署

1、安装流程

1.1 安装依赖包

bash 复制代码
yum update
yum install -y curl openssh-server ca-certificates tzdata perl
#以下安装邮件服务器可跳过
yum install -y postfix

1.2 清华园下载对应版本的包

Index of /gitlab-ce/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

(官网地址: packages.gitlab.com )

bash 复制代码
yum -y install gitlab-ce-17.1.1-ce.0.el7.x86_64.rpm

1.3 修改配置文件

bash 复制代码
vim /etc/gitlab/gitlab.rb
external_url 'http://192.168.232.135:1000/'  #本地服务器ip
puma['worker_timeout'] = 30   #设置最大请求持续时间
gitlab_rails['time_zone'] = 'Asia/Shanghai'
puma['worker_processes'] = 2
postgresql['shared_buffers'] = "128MB"   #减少数据库缓存(默认为256MB 改为128MB)
postgresql['max_worker_processes'] = 3   #减少数据库并发数
puma['per_worker_max_memory_mb'] = 600   #更改内存限制设置
prometheus_monitoring['enable'] = false   #普罗米修斯监控关闭启用

查询加载配置文件 (等待几分钟即可)
gitlab-ctl reconfigure

重启gitlab
gitlab-ctl restart
查看gitlab状态
gitlab-ctl status

2、web配置流程

2.1 浏览器访问gitlab

http://192.168.232.135:1000/

root默认密码存放在/etc/gitlab/initial_root_password

修改为中文界面

修改默认密码

开启本地网络请求 (后续自动构建使用)

相关推荐
2501_928996227 小时前
Agent 开发的 API 选型:从 Function Calling 到多模型协作的中科热备底层逻辑
服务器·重构·gitlab
何以解忧,唯有..15 小时前
Claude Code 常用操作总结
gitlab
GGG76616 小时前
K8s1.28 全栈落地|Jenkins+GitLab+Harbor DevOps 流水线封神实战
kubernetes·gitlab·jenkins
Patrick_Wilson2 天前
为什么gitlab的MR会默认有一个merge commit
前端·git·gitlab
极小狐2 天前
极狐GitLab Duo 功能更新:扩展 MCP 工具集、支持 MR 事件触发
运维·gitlab·agent·mr·极狐gitlab·mcp·极狐gitlab duo
2501_928996222 天前
GitLab CVE-2026-19478漏洞解析:Gitaly ref攻击绕过审计与中科热备下的代码资产保护重构
重构·gitlab
秦渝兴2 天前
GitLab CI/CD 流水线实战
ci/cd·gitlab
Ningcode_cloud4 天前
什么是CICD? GitLab + Jenkins 持续集成实战部署手册
运维·ci/cd·云原生·容器·gitlab·jenkins
姚永强4 天前
gitlab安装
运维·gitlab
力江5 天前
GitLab 私有化部署实战 —— 从 Omnibus 到 Docker 的踩坑之旅
docker·容器·gitlab