升级GitLab6.x - 1

GitLab 的详细介绍:请点这里
GitLab 的下载地址:请点这里

1. 备份

cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production

2. 停止gitlab服务

sudo service gitlab stop

3. 获取最新的发行版本

cd /home/git/gitlab
sudo -u git -H git fetch

删除原来的application.rb文件

sudo -u git rm -rf config/application.rb

检出新版本

sudo -u git -H git checkout 6-3-stable

4. 升级gitlab-shell

cd /home/git/gitlab-shell
sudo -u git -H git fetch
sudo -u git -H git checkout v1.8.0

5. 安装库并迁移他

以MySQL为例

cd /home/git/gitlab
sudo -u git -H bundle install --without development test postgres --deployment

迁移数据库

sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production

清除缓冲

sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production

6. 升级配置文件

cd /home/git/gitlab
sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb

7. 升级启动脚本

sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab

8. 重启

sudo service gitlab start
sudo service nginx restart

附:

 

检查Gitlab环境信息

升级GitLab6.x - 1

升级GitLab6.x - 1

升级GitLab6.x - 1

 

检查Gitlab情况

升级GitLab6.x - 1

升级GitLab6.x - 1

相关阅读

相关推荐