升级GitLab6.x-1

浏览:
字体:
发布时间:2013-12-15 22:19:01
来源:

升级GitLab6.x之6.2to6.3

前一篇博文《在 Ubuntu 12.04 上安装 GitLab6.x》已经介绍了安装Gitlab6.2的过程,那么怎么升级他呢?

1. 备份

cd /home/git/gitlabsudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
2. 停止gitlab服务
sudo service gitlab stop
3. 获取最新的发行版本
cd /home/git/gitlabsudo -u git -H git fetch
删除原来的application.rb文件
sudo -u git rm -rf config/application.rb
检出新版本
sudo -u git -H git checkout 6-3-stable4. 升级gitlab-shell
cd /home/git/gitlab-shellsudo -u git -H git fetchsudo -u git -H git checkout v1.8.0
5. 安装库并迁移他

以MySQL为例

cd /home/git/gitlabsudo -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/gitlabsudo -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/gitlabsudo chmod +x /etc/init.d/gitlab
8. 重启  
sudo service gitlab startsudo service nginx restart附:   

检查Gitlab环境信息

/

/

/

检查Gitlab情况

/

/

终端执行情况:

tdtc010@tdtc010-Vostro-270:~$ cd /home/git/gitlabtdtc010@tdtc010-Vostro-270:/home/git/gitlab$ sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=productionSystem informationSystem:         Ubuntu 12.04Current User:   gitUsing RVM:      noRuby Version:   2.0.0p247Gem Version:    2.0.3Bundler Version:1.3.5Rake Version:   10.1.0GitLab informationVersion:        6.3.1Revision:       779b4dcDirectory:      /home/git/gitlabDB Adapter:     mysql2URL:            http://localhostHTTP Clone URL: http://localhost/some-project.gitSSH Clone URL:  git@localhost:some-project.gitUsing LDAP:     noUsing Omniauth: noGitLab ShellVersion:        1.8.0Repositories:   /home/git/repositories/Hooks:          /home/git/gitlab-shell/hooks/Git:            /usr/bin/gittdtc010@tdtc010-Vostro-270:/home/git/gitlab$ sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=productionChecking Environment ...Git configured for git user? ... yesHas python2? ... yespython2 is supported version? ... yesChecking Environment ... FinishedChecking GitLab Shell ...GitLab Shell version >= 1.7.9 ? ... OK (1.8.0)Repo base directory exists? ... yesRepo base directory is a symlink? ... noRepo base owned by git:git? ... yesRepo base access is drwxrws---? ... yesupdate hook up-to-date? ... yesupdate hooks in repos are links: ...xiao bin / companySite ... okRunning /home/git/gitlab-shell/bin/checkCheck GitLab API access: OKCheck directories and files:        /home/git/repositories: OK        /home/git/.ssh/authorized_keys: OKTest redis-cli executable: redis-cli 2.2.12Send ping to redis server: PONGgitlab-shell self-check successfulChecking GitLab Shell ... FinishedChecking Sidekiq ...Running? ... yesNumber of Sidekiq processes ... 1Checking Sidekiq ... FinishedChecking GitLab ...Database config exists? ... yesDatabase is SQLite ... noAll migrations up? ... yesGitLab config exists? ... yesGitLab config outdated? ... noLog directory writable? ... yesTmp directory writable? ... yesInit script exists? ... yesInit script up-to-date? ... yesprojects have namespace: ...xiao bin / companySite ... yesProjects have satellites? ...xiao bin / companySite ... yesRedis version >= 2.0.0? ... yesYour git bin path is "/usr/bin/git"Git version >= 1.7.10 ? ... yes (1.8.5)Checking GitLab ... Finished
>更多相关文章
24小时热门资讯
24小时回复排行
资讯 | QQ | 安全 | 编程 | 数据库 | 系统 | 网络 | 考试 | 站长 | 关于东联 | 安全雇佣 | 搞笑视频大全 | 微信学院 | 视频课程 |
关于我们 | 联系我们 | 广告服务 | 免责申明 | 作品发布 | 网站地图 | 官方微博 | 技术培训
Copyright © 2007 - 2024 Vm888.Com. All Rights Reserved
粤公网安备 44060402001498号 粤ICP备19097316号 请遵循相关法律法规
');})();