注:不要跨过8.16升级至8.17,这样做升级过程会报错

###################################8.2升级至8.16###########################

一,停止服务:

service gitlab stop

二,备份

cd /home/git/gitlab

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

三,更新ruby

mkdir /tmp/ruby && cd /tmp/ruby
curl --remote-name --progress https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.3.tar.gz
echo '1014ee699071aa2ddd501907d18cbe15399c997d ruby-2.3.3.tar.gz' | shasum -c - && tar xzf ruby-2.3.3.tar.gz
cd ruby-2.3.3
./configure --disable-install-rdoc
make
sudo make install

sudo gem install bundler --no-ri --no-rdoc

//四,更新&安装node

五,获取最新代码

cd /home/git/gitlab

sudo -u git -H git fetch --all
sudo -u git -H git checkout -- db/schema.rb

sudo -u git -H git checkout 8-16-stable

六,更新数据库等

登陆MySQL修改权限:

GRANT REFERENCES ON `gitlabhq_production`.* TO 'git'@'localhost';

cd /home/git/gitlab

sudo -u git -H bundle install --without postgres development test --deployment

sudo -u git -H bundle clean

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

七,更新workhorse

cd /home/git/gitlab

sudo -u git -H bundle exec rake "gitlab:workhorse:install[/home/git/gitlab-workhorse]" RAILS_ENV=production

八,更新gitlab-shell

cd /home/git/gitlab-shell

sudo -u git -H git fetch --all --tags
sudo -u git -H git checkout v4.1.1

九,更新配置文件

cp config/gitlab.yml.example config/gitlab.yml

vim config/gitlab.yml

sudo -u git -H git config --global repack.writeBitmaps true

十,更新nginx文件

vim  lib/support/nginx/gitlab-ssl

vim  lib/support/nginx/gitlab

cp lib/support/nginx/gitlab /etc/nginx/conf.d/gitlab.conf

十一,SMTP配置

vim config/initializers/smtp_settings.rb   ===>ActionMailer::Base.delivery_method = :smtp

十二,更新启动脚本

sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab

十三,启动服务&检查

sudo service gitlab start
sudo service nginx restart

sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

##################################################8.16升级至8.17##############################

一,停止服务

service gitlab stop

二,备份

三,更新ruby

ruby > 2.3    ===========》使用2.3.3

npm   2.14.12

node 4.3.0

/////////gcc  6.3.0====》不升级,会导致后续升级问题

四,获取最新代码

cd /home/git/gitlab

sudo -u git -H git fetch --all
sudo -u git -H git checkout -- db/schema.rb

sudo -u git -H git checkout 8-17-stable

五,更新lib等

sudo -u git -H bundle install --without postgres development test --deployment
sudo -u git -H bundle clean
sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production

npm install --production

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

六,更新workhorse

sudo -u git -H bundle exec rake "gitlab:workhorse:install[/home/git/gitlab-workhorse]" RAILS_ENV=production

七,更新gitlab-shell

cd /home/git/gitlab-shell

sudo -u git -H git fetch --all --tags

sudo -u git -H git checkout v4.1.1

八,更新配置文件

cd /home/git/gitlab

cd config

cp gitlab.yml.example gitlab.yml

vim gitlab.yml

九,git设置

sudo -u git -H git config --global repack.writeBitmaps true

十,nginx配置

cp lib/support/nginx/gitlab /etc/nginx/conf.d/gitlab_8.17

vim /etc/nginx/nginx.conf

十一,更新启动脚本

cd /home/git/gitlab

sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab

十二,启动服务&检查运行

sudo service gitlab start
sudo service nginx restart
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

#######################################8.17升级至9.0############################

一,停止服务

service gitlab stop

二,更新ruby/node&安装yarn

ruby 更新=======》跳过   =====》见上次升级 or 上上次

更新node  =====>跳过

安装yarn:   ===(1.12.3)

curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo

sudo yum install yarn

三,获取新代码

cd /home/git/gitlab

sudo -u git -H git fetch --all
sudo -u git -H git checkout -- db/schema.rb

sudo -u git -H git checkout 9-0-stable

四,更新gitlab-shell

cd /home/git/gitlab-shell

sudo -u git -H git fetch --all --tags

sudo -u git -H git checkout v$(</home/git/gitlab/GITLAB_SHELL_VERSION)

五,更新workhorse

cd /home/git/gitlab-workhorse

sudo -u git -H git fetch --all --tags

sudo -u git -H git checkout v$(</home/git/gitlab/GITLAB_WORKHORSE_VERSION)

sudo -u git -H make

六,更新配置文件

cd /home/git/gitlab

cp config/gitlab.yml.example config/gitlab.yml

七,git配置

sudo -u git -H git config --global repack.writeBitmaps true

八,nginx配置

cp lib/support/nginx/gitlab /etc/nginx/conf.d/gitlab9.conf

vim /etc/nginx/conf.d/gitlab9.conf

vim /etc/nginx/nginx.conf

九,更新启动脚本

sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab

十,更新lib等

yum install re2-devel

sudo -u git -H bundle install --without postgres development test --deployment

sudo -u git -H bundle clean

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

mkdir -p /home/git/gitlab/node_modules/compression-webpack-plugin/node_modules

chown -R git:git /home/git/gitlab/node_modules/compression-webpack-plugin/node_modules

su - git

cd /home/git/gitlab

bundle exec rake yarn:install gitlab:assets:clean gitlab:assets:compile RAILS_ENV=production NODE_ENV=production   ===>成功后回到root用户

安装gitly======>暂时跳过

十一,启动服务&监控变化

service gitlab start

service nginx restart

sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

最新文章

  1. 一个在ASP.NET中利用服务器控件GridView实现数据增删改查的例子
  2. Linux命令之diff
  3. Web API应用架构设计分析(2)
  4. javascript 继承实现
  5. Flex Error #2156问题
  6. Erlang 虚拟机 BEAM 指令集之内存管理相关的指令
  7. Hibernate - 使用注解完成映射
  8. C#用网易邮箱发送邮件(同步异步)
  9. Qt中Ui名字空间以及setupUi函数的原理和实现
  10. ExtJs4 笔记(13) Ext.menu.Menu 菜单、Ext.draw.Component 绘图、Ext.resizer.Resizer 大小变更
  11. Python全栈学习_day002作业
  12. 位运算符&amp;与、或|、异或^
  13. 小学生四则运算App实验成果
  14. @PathVariable和@RequestParam
  15. POI解析大量数据
  16. F# 图形数学基础。
  17. Docker容器的自动化监控实现
  18. C#里partial关键字的作用
  19. e684. 以多种格式打印
  20. python实现进度条--主要用在上传下载文件

热门文章

  1. hive on tez配置
  2. .NET工程师必须掌握的知识点
  3. windows Git Bash 无法运行python解决方法
  4. 加载properties文件的三种方法
  5. Nessus离线安装及升级插件
  6. day4_高效处理文件
  7. easyui中多级表头,主表头不能添加field字段,否则不居中
  8. input=&quot;file&quot; 浏览时只显示指定excel文件,筛选特定文件类型
  9. BOM简单总结
  10. WEB测试用例设计总结