Data backup (the default backup directory is under /var/opt/gitlab/backups/, and a tar package named after the time node is generated.)
gitlab-rake gitlab:backup:create
Create a new repo source and upgrade the new version of gitlab
vim /etc/yum.repos.d/gitlab-ce.repo
[gitlab-ce]
name=gitlab-ce
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
repo_gpgcheck=0
gpgcheck=0
enable=1
gpgkey=https://packages.gitlab.com/gpg.key
Check the version number:
cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
The upgrade must be upgraded step by step according to the version number
Step 1: Stop the service
sudo gitlab-ctl stop
Step 2: Start the database
sudo gitlab-ctl start postgresql
Step 3: Start the installation and upgrade (for example, the current version is 11.8.6 and needs to be upgraded to 11.11.8)
yum install -y gitlab-ce-11.11.8
Step 4: Reload configuration
gitlab-ctl reconfigure
Step 5: Restart the GitLab service
gitlab-ctl restart
Step 6: Open the access link, verify, if 502 appears, wait for 30 seconds to refresh
If you still need to continue to upgrade, just repeat the first to sixth steps, but the version number is different!