当前位置: 首页 > backend >正文

Centos7安装gitlab

环境准备:


操作系统:Centos7

内存:2G以上

磁盘:50G

安全:关闭防火墙,selinux


1、安装GitLab所需依赖

 yum -y install policycoreutils openssh-server openssh-clients postfix

2、设置postfix开机自启

 sudo systemctl enable postfixsudo systemctl start postfixsudo systemctl status postfix

3. 安装GitLab仓库(可选)

 # 为了方便安装,你可以添加GitLab的官方仓库。curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

4. 安装GitLab CE(社区版)

 sudo EXTERNAL_URL="http://192.168.131.128" yum install -y gitlab-ce-12.0.3-ce.0.el7.x86_64

5. 配置GitLab

 # 编辑配置文件sudo vim /etc/gitlab/gitlab.rb​# 修改以下参数(根据实际需求调整):external_url 'http://192.168.131.128:8181'  # 设置访问地址和端口git_data_dirs({ "default" => { "path" => "/data/gitlab/data" } })  # 自定义仓库存储路径(需提前创建目录)​# 保存并退出后,重载配置sudo gitlab-ctl reconfigure

6. 启动 GitLab 服务

 # 启动 GitLabsudo gitlab-ctl start​# 检查服务状态sudo gitlab-ctl status#gitlab管理命令gitlab-ctl startgitlab-ctl stopgitlab-ctl stop postgresqlgitlab-ctl restartgitlab-ctl statusgitlab-ctl reconfigure    #配置重载gitlab-ctl tail           #查看服务日志gitlab-ctl tail redis 

7. 访问 GitLab

在浏览器中访问 http://192.168.131.128。首次登录时,设置管理员密码(用户名默认为 root)。初始密码可通过以下命令查看(24 小时后失效):sudo cat /etc/gitlab/initial_root_password

8. gitlab汉化配置

汉化地址:https://gitlab.com/xhang/gitlab

 登录 GitLab。  点击右上角头像 → Preferences。  滚动到 Localization 部分,选择 简体中文。  保存并刷新页面。

http://www.xdnf.cn/news/10002.html

相关文章:

  • Vehicle HAL(1)--整体介绍
  • InnoDB中的锁
  • 龙虎榜——20250529
  • 2025年业财一体化如何重塑工程项目管理?
  • 下载jdk教程
  • 基于python 将图像上同一行距离相近的矩形框融合
  • Apifox 的“前置URL”和“请求地址”区别
  • 【网络入侵检测】基于Suricata源码分析FlowManager实现
  • DEEPSEEK帮写的STM32消息流函数,直接可用.已经测试
  • PostgreSQL主从同步双机集群创建与配置
  • 使用 Arthas 查看接口方法执行时间
  • 时间序列噪声模型分析软件推荐与使用经验
  • SQL(Database Modifications)
  • 【达梦】达梦数据库使用TypeHandler读取数据库时,将字段中的数据读取为数组
  • UIAbility组件基础
  • Cadence Allegro中设置主画面最小显示间距
  • 江科大UART串口通讯hal库实现
  • 【大模型/MCP】MCP简介
  • 哈希之旅:从使用到底层建设
  • CCPC shandong 2025 G
  • 【数据集】中国日尺度1 km全天候地表温度数据集(2000-2022)
  • 尚硅谷redis7 74-85 redis集群分片之集群是什么
  • 【区间dp】-----例题5【田忌赛马】(暂时只会贪心解法)
  • Chuanpai、Nihongo wa Muzukashii Desu、K-skip Permutation
  • 3340. 检查平衡字符串
  • 【2025文博会现场直击】多图预警
  • One Year~
  • WES(三)——变异检测
  • Pix4d航测软件正射影像生产流程(一)项目创建及快速空三
  • Baklib企业知识激活解决方案