码迷,mamicode.com
首页 > 其他好文 > 详细

gitlab从8.6.5升级到8.11.7(补丁版本通用更新指南)

时间:2016-09-29 11:34:58      阅读:208      评论:0      收藏:0      [点我收藏+]

标签:gitlab升级   gitlab8.6.5   gitlab8.7.11   

环境介绍:

CentOS6.7

gitlab:8.6.5

需求:gitlab从8.6.5升级到8.11.7

第一、gitlab8.6.5安装

    参考《GitLab完整搭建(8.6.5).docx》

第二、gitlab8.6.5升级

0.升级之前. Backup备份

It‘s useful to make a backup just in case things go south: (With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version)

#su - git

$cd /home/git/gitlab

$bundle exec rake gitlab:backup:create RAILS_ENV=production

备份的文件在/home/git/gitlab/tmp/backups目录下:

技术分享

1. 停止服务

#service gitlab stop


2.获取最新版本分支代码

In the commands below, replace LATEST_TAG with the latest GitLab tag you want to update to, for example v8.0.3. Use git tag -l ‘v*.[0-9]‘ --sort=‘v:refname‘ to see a list of all tags. Make sure to update patch versions only (check your current version with cat VERSION).

$su - git
$cd /home/git/gitlab
$git fetch --all
$git checkout -- Gemfile.lock db/schema.rb
$git checkout v8.11.7 -b v8.11.7

技术分享

如果报错,删除修改过的文件

技术分享

技术分享

$vi VERSION


 将8.6.5替换为8.11.7

3.升级gitlab-shell版本

$cd /home/git/gitlab-shell
$git fetch
$git checkout v`cat /home/git/gitlab/GITLAB_SHELL_VERSION` -b v`cat /home/git/gitlab/GITLAB_SHELL_VERSION`

技术分享

技术分享

4.升级gitlab-workhorse版本

$cd /home/git/gitlab-workhorse
$git fetch
$git checkout v`cat /home/git/gitlab/GITLAB_WORKHORSE_VERSION` -b v`cat /home/git/gitlab/GITLAB_WORKHORSE_VERSION`
$make

技术分享

技术分享

技术分享


5.安装库环境

$cd /home/git/gitlab


# PostgreSQL(如果数据为psql用这条命令)

$bundle install --without development test mysql --deployment


# MySQL(如果数据为mysql用这条命令)

$bundle install --without development test postgres --deployment


技术分享

# Optional: clean up old gems

$bundle clean


# Run database migrations

$bundle exec rake db:migrate RAILS_ENV=production


技术分享

# Clean up assets and cache

$bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production


技术分享

6.启动gitlab相关服务

#service gitlab start
#service nginx restart

技术分享

7.检查程序状态

检查GitLab及其环境是否配置正确:

$bundle exec rake gitlab:env:info RAILS_ENV=production


确保没有报错,运行一次更彻底的检查:

$bundle exec rake gitlab:check RAILS_ENV=production


如果所有项目是绿色的,那么恭喜你升级完成!

gitlab从8.6.5升级到8.11.7到此结束。


本文出自 “小陌成长之路” 博客,请务必保留此出处http://309173854.blog.51cto.com/7370240/1857599

gitlab从8.6.5升级到8.11.7(补丁版本通用更新指南)

标签:gitlab升级   gitlab8.6.5   gitlab8.7.11   

原文地址:http://309173854.blog.51cto.com/7370240/1857599

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!