安装环境
GitLab 版本:7.14.3 升级到 8.17.8
Centos 6.10 x86_64 系统
安装包
旧:gitlab-ce-7.14.3-ce.0.el6.x86_64.rpm
新:gitlab-ce-8.17.8-ce.0.el6.x86_64.rpm
数据备份
cp -r /opt/gitlab/ /data/old/ # 安装目录
cp -r /var/opt/gitlab/ /data/old/gitlab-var # 配置目录
cp -r /etc/gitlab/gitlab.rb /data/old/ # 配置文件
安装
rm -rf /opt/gitlab/
rpm -ivh gitlab-ce-8.17.8-ce.0.el6.x86_64.rpm --force #因之前已经安装过,所以需要加--force
rpm -q gitlab-ce # 查看会有两个
gitlab-ce-7.14.3-ce.0.el6.x86_64
gitlab-ce-8.17.8-ce.0.el6.x86_64
启动
gitlab-ctl reconfigure #重置配置,等待重置后会自动重启
gitlab-ctl status # 查看状态
run: gitlab-workhorse: (pid 26782) 89907s; run: log: (pid 15672) 92293s
run: logrotate: (pid 1686) 2287s; run: log: (pid 15700) 92289s
run: nginx: (pid 15686) 92291s; run: log: (pid 15685) 92291s
run: postgresql: (pid 14977) 92471s; run: log: (pid 14976) 92471s
run: redis: (pid 14954) 92473s; run: log: (pid 14953) 92473s
run: sidekiq: (pid 15667) 92294s; run: log: (pid 15666) 92294s
run: unicorn: (pid 27042) 89860s; run: log: (pid 15633) 92295s
报错处理
git pull 没有问题,push的时候报:The project you were looking for could not be found.
原因:push的时候找不到仓库,需要在gitlab-shell配置文件指定repos_path
解决:
vim /var/opt/gitlab/gitlab-shell/config.yml # 打开文件,加如下配置
repos_path: "/data/git-data/repositories"