DevOps系列---【centos 7离线安装中文版GitLab】

1.下载安装包

建议:如果服务器内存大,则可以下载最新的包,如何内存比较小,建议使用gitlab-ce-9.0.11-ce.0.el7.x86_64.rpm

从【清华大学开源软件镜像站 】下载最新中文版gitlab安装包,安装包里自带了简体中文汉化包。

从【gitlab官网 】 下载gitlab最新安装包。

清华大学开源软件镜像站下载地址 :https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/

gitlab官网下载地址:https://packages.gitlab.com/gitlab/gitlab-ce

或用

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-13.0.5-ce.0.el7.x86_64.rpm

2.GitLab安装

yum安装

yum -y install gitlab-ce-13.0.5-ce.0.el7.x86_64.rpm
yum -y install git   #安装git,这一步可以跳过

rpm安装

rpm -ivh gitlab-ce-13.0.5-ce.0.el7.x86_64.rpm

3.修改配置文件

vi /etc/gitlab/gitlab.rb
# 修改 external_url 'example.gitlab.com' 这一句
external_url 'http://localhost:9091'  #修改成你自己的IP或域名:端口
#默认存储路径/var/opt/gitlab/git-data/,建议不修改
git_data_dirs({"default" => {"path" => "/home/gitlab/data"}})

4.重新加载配置

gitlab-ctl reconfigure     #重新生成相关配置文件,执行此命令时间比较长
#如果报权限的问题,执行下面的命令
chmod 2770 /var/opt/gitlab/git-data/repositories
chmod 2770 /home/gitlab/data/repositories

配置自动启动

systemctl enable gitlab-runsvdir.service
systemctl start gitlab-runsvdir.service
# 关闭gitlab的自动启动命令:systemctl disable gitlab-runsvdir.service
#查看版本
cat /opt/gitlab/embedded/service/gitlab-rails/VERSION

5.验证是否安装成功(记得关闭防火墙)

http://localhost:9091

 

posted on   少年攻城狮  阅读(203)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示