目录

GitLab-离线安装、汉化、卸载

# GitLab-离线安装&汉化&卸载

# 一、离线安装

# 1. 下载需求版本的rpm包,并传送到服务器

gitlab rpm下载地址:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/

# 2. 安装gitlab

$ rpm -ivh gitlab-ce-12.3.5-ce.0.el6.x86_64.rpm
1

# 3. 修改配置文件

$ vim /etc/gitlab/gitlab.rb
1

配置http协议所使用的访问地址

external_url 'http://192.168.123.45'
1

# 4.初始化 GitLab

$ sudo gitlab-ctl reconfigure
1

# 5. 启动gitlab

$ gitlab-ctl restart
1

IP访问,第一次访问,系统会要求重置新密码,管理员的用户名为root

# 二、汉化gitlab

# 1. 停止gitlab

$ gitlab-ctl stop
1

# 2.下载中文补丁包

【重要】需要下载和gitlab同样版本的中文补丁包,不然可能会导致gitlab瘫痪,下载zh结尾(中文) 下载地址:https://gitlab.com/xhang/gitlab

# 3. 解压

$ tar xf gitlab-v12.3.5-zh.tar.gz
1

# 4. 复制并覆盖

$ \cp -rf ./gitlab-v12.3.5-zh/* /opt/gitlab/embedded/service/gitlab-rails/
1

复制完成后,需要重新加载配置,并启动Gitlab

$ gitlab-ctl reconfigure    
$ gitlab-ctl restart
1
2

登录完成,点击右上角的Settings进行Preferences设置,在语言项选择中文,

# 三、卸载

# 1、停止gitlab

$ gitlab-ctl stop
1

# 2、卸载gitlab(注意这里写的是gitlab-ce)

$ rpm -e gitlab-ce
1

# 3、查看gitlab进程

$ ps aux | grep gitlab
1

4、杀掉第一个进程(就是带有好多.............的进程)

$ kill -9 ID
1

杀掉后,在ps aux | grep gitlab确认一遍,还有没有gitlab的进程

5、删除所有包含gitlab文件

$ find / -name gitlab | xargs rm -rf
1

参考链接:

1.https://www.cnblogs.com/sunhongleibibi/p/12072689.html

2.https://www.jianshu.com/p/f3cce3e362a4

3.https://developer.aliyun.com/article/114619

上次更新: 2024/03/20, 23:57:47
最近更新
01
使用 acme.sh 自动化SSL证书管理
03-25
02
COSCLI 的使用记录
03-25
03
腾讯云命令行工具 TCCLI
03-25
更多文章>