以下是在CentOS系统中更新与升级GitLab的指南:
sudo gitlab-rake gitlab:backup:create
命令备份数据库、配置文件等数据。curl
、policycoreutils
、openssh-server
、postfix
等必要依赖包。sudo gitlab-rake gitlab:env:info
命令查看当前GitLab版本,确定要升级的目标版本。sudo gitlab-ctl stop unicorn
、sudo gitlab-ctl stop sidekiq
、sudo gitlab-ctl stop nginx
。sudo rpm -Uvh gitlab-ce-<version>.rpm
命令安装新版本包。sudo gitlab-ctl reconfigure
。sudo gitlab-ctl restart
。docker-compose down -v
、docker-compose stop
、docker-compose rm -f
。docker pull gitlab/gitlab-ce:<new_version>
。docker-compose up -d
。通过访问GitLab管理界面,查看版本号是否更新,或使用sudo gitlab-rake gitlab:check
命令检查升级是否成功。