gitlab升级(从11.10.4 升级到 15.1.2)

1. 查看当前gitlab版本

cat /opt/gitlab/embedded/service/gitlab-rails/VERSION

2. 备份(注意备份时的版本,需要还原到备份时的版本才能恢复备份)

/opt/gitlab/bin/gitlab-rake gitlab:backup:create

3. 停止gitlab

sudo gitlab-ctl stop

4. 下载包(从11.10.4 升级到 15.1.2所需的版本包)

wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/trusty/gitlab-ce_11.10.4-ce.0_amd64.deb/download.deb # 如果已经安装11.10.4,不用下载这个
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/xenial/gitlab-ce_11.11.8-ce.0_amd64.deb/download.deb
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/stretch/gitlab-ce_12.0.12-ce.0_amd64.deb/download.deb
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/bionic/gitlab-ce_12.1.17-ce.0_amd64.deb/download.deb
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/xenial/gitlab-ce_12.10.14-ce.0_amd64.deb/download.deb
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/stretch/gitlab-ce_13.0.14-ce.0_amd64.deb/download.deb
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/xenial/gitlab-ce_13.1.11-ce.0_amd64.deb/download.deb
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/bionic/gitlab-ce_13.8.8-ce.0_amd64.deb/download.deb
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/xenial/gitlab-ce_13.12.15-ce.0_amd64.deb/download.deb
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/focal/gitlab-ce_14.0.12-ce.0_amd64.deb/download.deb
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/focal/gitlab-ce_14.3.6-ce.0_amd64.deb/download.deb
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/debian/bullseye/gitlab-ce_14.9.5-ce.0_amd64.deb/download.deb
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/bionic/gitlab-ce_14.10.5-ce.0_amd64.deb/download.deb
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/bionic/gitlab-ce_15.0.2-ce.0_amd64.deb/download.deb
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/bionic/gitlab-ce_15.1.2-ce.0_amd64.deb/download.deb

5. 升级gitlab (要严格按照顺序升级,从11.10.4 升级到 15.1.2)

sudo dpkg -i gitlab-ce_11.10.4-ce.0_amd64.deb
sudo dpkg -i gitlab-ce_11.11.8-ce.0_amd64.deb
sudo dpkg -i gitlab-ce_12.0.12-ce.0_amd64.deb
sudo dpkg -i gitlab-ce_12.1.17-ce.0_amd64.deb
sudo dpkg -i gitlab-ce_12.10.14-ce.0_amd64.deb
sudo dpkg -i gitlab-ce_13.0.14-ce.0_amd64.deb
sudo dpkg -i gitlab-ce_13.1.11-ce.0_amd64.deb
sudo dpkg -i gitlab-ce_13.8.8-ce.0_amd64.deb
sudo dpkg -i gitlab-ce_13.12.15-ce.0_amd64.deb
sudo dpkg -i gitlab-ce_14.0.12-ce.0_amd64.deb
sudo dpkg -i gitlab-ce_14.3.6-ce.0_amd64.deb
sudo dpkg -i gitlab-ce_14.9.5-ce.0_amd64.deb
sudo dpkg -i gitlab-ce_14.10.5-ce.0_amd64.deb
sudo dpkg -i gitlab-ce_15.0.2-ce.0_amd64.deb
sudo dpkg -i gitlab-ce_15.1.2-ce.0_amd64.deb

你可能感兴趣的:(gitlab,debian,linux)