阅读量:3
在Ubuntu里更新GitLab主要有两种方法:
- 使用APT包管理器更新:
- 备份数据:
sudo gitlab-rake gitlab:backup:create。 - 更新系统包:
sudo apt update,sudo apt upgrade。 - 添加GitLab官方仓库(若未添加):
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash。 - 升级GitLab:
sudo apt-get install gitlab-ce(若指定版本,用sudo apt-get install gitlab-ce=)。 - 重新配置并重启服务:
sudo gitlab-ctl reconfigure,sudo gitlab-ctl restart。
- 备份数据:
- 使用Docker更新:
- 备份数据:备份GitLab数据卷。
- 停止并删除现有容器:
docker stop,docker rm。 - 拉取最新镜像:
docker pull gitlab/gitlab-ce:latest。 - 启动新容器:
docker run --name。-d --restart always -p 80:80 -p 443:443 -p 22:22 -e GITLAB_OMNIBUS_CONFIG="external_url 'http://your_server_ip'" gitlab/gitlab-ce:latest
升级前建议先查阅GitLab官方升级指南,并确认版本兼容性。
以上就是关于“ubuntu里gitlab如何更新”的相关介绍,筋斗云是国内较早的云主机应用的服务商,拥有10余年行业经验,提供丰富的云服务器、租用服务器等相关产品服务。云服务器资源弹性伸缩,主机vCPU、内存性能强悍、超高I/O速度、故障秒级恢复;电子化备案,提交快速,专业团队7×24小时服务支持!
简单好用、高性价比云服务器租用链接:https://www.jindouyun.cn/product/cvm