因为我们使用 Omnibus GitLab package 进行安装,所以我们的升级相对比较简单,也建议大家使用这种方式安装,我目前的版本是10.0.4要升级到11.2.3,这算是大版本升级,根据官方文档的要求,我们需要先升级到10.x的最高版本。
1、升级过渡版本 10.8.7
升级过程中会对数据进行自动备份,不用担心数据安全。
# 下载对应版本的 rpm 包
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.8.7-ce.0.el7.x86_64.rpm
# 安装此过渡版本
rpm -Uvh gitlab-ce-10.8.7-ce.0.el7.x86_64.rpm
2、升级最新版本 11.2.3
# 下载最新版本的 rpm 包
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.2.3-ce.0.el7.x86_64.rpm
# 安装最新版本
rpm -Uvh gitlab-ce-11.2.3-ce.0.el7.x86_64.rpm
#升级过程
warning: gitlab-ce-11.2.3-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
Preparing... ################################# [100%]
gitlab preinstall: Automatically backing up only the GitLab SQL database (excluding everything else!)
Dumping database ...
Dumping PostgreSQL database gitlabhq_production ... [DONE]
done
Dumping repositories ...
[SKIPPED]
Dumping uploads ...
[SKIPPED]
Dumping builds ...
[SKIPPED]
Dumping artifacts ...
[SKIPPED]
Dumping pages ...
[SKIPPED]
Dumping lfs objects ...
[SKIPPED]
Dumping container registry images ...
[DISABLED]
Creating backup archive: 1535946629_2018_09_03_10.8.7_gitlab_backup.tar ... done
Uploading backup archive to remote storage ... skipped
Deleting tmp directories ... done
done
Deleting old backups ... skipping
Updating / installing...
1:gitlab-ce-11.2.3-ce.0.el7 ############################# ( 87%)
......
......
_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __ \
/ /_/ / / /_/ /___/ /_/ / /_/ /
\____/_/\__/_____/\__,_/_.___/
Upgrade complete! If your GitLab server is misbehaving try running
sudo gitlab-ctl restart
before anything else.
If you need to roll back to the previous version you can use the database
backup made during the upgrade (scroll up for the filename).
3、升级成功
更多GitLab相关教程见以下内容:
CentOS7安装GitLab、汉化及使用 https://www.linuxidc.com/Linux/2017-11/148223.htm
CentOS 7安装部署GitLab服务器 https://www.linuxidc.com/Linux/2017-06/144990.htm
CentOS 7.x上GitLab搭建详细教程 https://www.linuxidc.com/Linux/2017-12/149766.htm
CentOS 7安装部署GitLab服务器 https://www.linuxidc.com/Linux/2017-06/144990.htm
CentOS 7使用Docker搭建GitLab服务器 https://www.linuxidc.com/Linux/2018-04/151725.htm
Ubuntu 16.04搭建GitLab服务器 https://www.linuxidc.com/Linux/2018-01/150319.htm
快速学会CentOS配置GitLab https://www.linuxidc.com/Linux/2018-08/153345.htm
GitLab 的详细介绍:请点这里
GitLab 的下载地址:请点这里
Linux公社的RSS地址:https://www.linuxidc.com/rssFeed.aspx