{"id":1623,"date":"2021-07-27T03:40:04","date_gmt":"2021-07-27T03:40:04","guid":{"rendered":"https:\/\/www.ipcpu.com\/?p=1623"},"modified":"2022-08-01T14:06:29","modified_gmt":"2022-08-01T14:06:29","slug":"gitlab-update","status":"publish","type":"post","link":"https:\/\/c.ipcpu.com\/2021\/07\/gitlab-update\/","title":{"rendered":"gitlab\u6570\u636e\u8fc1\u79fb\u548c\u5347\u7ea7"},"content":{"rendered":"\n

gitlab\u6570\u636e\u8fc1\u79fb\u548c\u5347\u7ea7.md
\u6211\u4eec\u7684gitlab\u662f\u53e4\u8001\u7684gitlab 7.6 \u5f00\u53d1\u4eba\u5458\u60f3\u4f7f\u7528\u65b0\u529f\u80fd\uff0c\u8bb0\u5f55\u4e86\u4e0b\u5347\u7ea7\u8fc7\u7a0b\u3002<\/p>\n\n\n\n

\u4e00\u3001gitlab\u5907\u4efd\u6570\u636e<\/h2>\n\n\n\n
\n
gitlab-rakegitlab:backup:create<\/code><\/pre>\n<\/div>\n\n\n\n

\u9ed8\u8ba4\u5907\u4efd\u76ee\u5f55\u662f\/var\/opt\/gitlab\/backups\uff0c\u53ef\u4ee5\u5728gitlab.rb\u4e2d\u4fee\u6539\u3002<\/p>\n\n\n\n

\u4e8c\u3001gitlab\u6062\u590d\u6570\u636e<\/h2>\n\n\n\n
\n
gitlab-ctl stop unicorn\ngitlab-ctl stop sidekiq\n#@\u4e0d\u8981\u5168\u505c\uff0c\u6570\u636e\u5e93\u5f97\u542f\u52a8\u7740\ngitlab-rake gitlab:backup:restore BACKUP=1557685869\n#@\u6062\u590d\u65f6\uff0c\u4e0d\u8981\u6307\u5168\u540d\uff0c\u53ea\u5199\u65f6\u95f4\u6233\u90e8\u5206\ngitlab-ctl reconfigure<\/code><\/pre>\n<\/div>\n\n\n\n

\u6ce8\u610f\uff1a\u6062\u590d\u6570\u636e\u65f6\uff0cgitlab\u7248\u672c\u5fc5\u987b\u548c\u5907\u4efd\u65f6\u7684\u7248\u672c\u4e00\u81f4\uff0c\u8981\u4e0d\u7136\u65e0\u6cd5\u6062\u590d\u3002<\/p>\n\n\n\n

\u4e09\u3001\u7248\u672c\u5347\u7ea7<\/h2>\n\n\n\n

gitlab\u7248\u672c\u5347\u7ea7\u65f6\uff0c\u552f\u4e00\u9700\u8981\u6ce8\u610f\u7684\u5c31\u662f\u9010\u4e2a\u5927\u7248\u672c\u5347\u7ea7\uff0c\u5982\u4e0b<\/p>\n\n\n\n

3.1 \u5347\u7ea7\u5230gitlab-ce-7.12.2~omnibus<\/h4>\n\n\n\n
\n
yum localinstall gitlab-ce-7.12.2~omnibus.1-1.x86_64.rpm \nsudo ln -sf   \/opt\/gitlab\/bin\/gitlab-ctl   \/opt\/gitlab\/bin\/gitlab-rake   \/opt\/gitlab\/bin\/gitlab-rails   \/opt\/gitlab\/bin\/gitlab-ci-rake   \/opt\/gitlab\/bin\/gitlab-ci-rails  \/usr\/bin\/\ngitlab-ctl reconfigure\n#@\u5982\u679c\u62a5500\u9519\u8bef\uff0c\u6267\u884c\u4e0b\u4e0b\u9762\u7684\u8bed\u53e5\ngitlab-rake db:migrate\ngitlab-ctl restart<\/code><\/pre>\n<\/div>\n\n\n\n

3.2 \u5347\u7ea7\u52308\u7248\u672c<\/h4>\n\n\n\n
\n
yum localinstall gitlab-ce-8.10.0-ce.1.el7.x86_64.rpm \nyum localinstall  gitlab-ce-8.17.7-ce.0.el7.x86_64.rpm<\/code><\/pre>\n<\/div>\n\n\n\n

3.3 \u5347\u7ea7\u52309\u300110\u7248\u672c<\/h4>\n\n\n\n

9\u7248\u672c\u548c10\u7248\u672c\u53ea\u662f\u4e00\u4e2a\u4e2d\u95f4\u7248\u672c\uff0c\u4f46\u662f\u4e5f\u7ed5\u4e0d\u8fc7\u53bb\uff0c9-10\u7248\u672c\u7684\u6700\u5927\u53d8\u66f4\u662fPostgreSQL\u7248\u672c\u7684\u5347\u7ea7\u3002<\/p>\n\n\n\n

\n
yum localinstall gitlab-ce-9.5.10-ce.0.el7.x86_64.rpm\nyum localinstall gitlab-ce-10.8.7-ce.0.el7.x86_64.rpm<\/code><\/pre>\n<\/div>\n\n\n\n

3.4 \u7ee7\u7eed\u5347\u7ea7<\/h4>\n\n\n\n

\u5230\u73b0\u5728gitlab\u7684\u7248\u672c\u5df2\u7ecf\u57fa\u672c\u8ddf\u4e0a\u5b98\u65b9\u8fdb\u5ea6\u4e86\uff0c\u5927\u5bb6\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u8fdb\u884c\u5347\u7ea7\uff0c\u5efa\u8bae\u534a\u5e74\u5230\u4e00\u5e74\u5347\u7ea7\u4e00\u6b21\u3002<\/p>\n\n\n\n

\n
yum localinstall gitlab-ce-11.10.4-ce.0.el7.x86_64.rpm<\/code><\/pre>\n<\/div>\n\n\n\n

\u5b98\u65b9\u6700\u65b0\u516c\u5e03\u7684\u5347\u7ea7\u8def\u5f84\uff1a<\/p>\n\n\n\n

\n
8.11.Z -> 8.12.0 -> 8.17.7 \n-> 9.5.10 \n-> 10.8.7 \n-> 11.11.8 \n-> 12.0.12 -> 12.1.17 -> 12.10.14 \n-> 13.0.14 -> 13.1.11 -> 13.8.8 -> 13.12.15 \n-> 14.0.12 -> 14.3.6 -> 14.9.5 -> 14.10.Z \n-> 15.0.Z -> latest 15.Y.Z<\/code><\/pre>\n<\/div>\n\n\n\n

\u56db\u3001\u5347\u7ea7\u5931\u8d25\u7684\u56de\u9000<\/h2>\n\n\n\n
\n
gitlab-ctl stop \u505c\u6b62\u6240\u6709\u670d\u52a1\n#gitlab-ctl cleanse #\u4fdd\u7559\u6570\u636e\u4e0d\u6267\u884c\u8be5\u547d\u4ee4\ngitlab-ctl uninstall\n#rm -rf \/opt\/gitlab #\u4fdd\u7559\u6570\u636e\u4e0d\u6267\u884c\u8be5\u547d\u4ee4\nyum remove gitlab-ce\nyum install gitlab-ce-old\n<\/code><\/pre>\n<\/div>\n\n\n\n\n

\u53c2\u8003\u8d44\u6599<\/h2>\n\n\n\n

https:\/\/docs.gitlab.com\/omnibus\/update\/<\/a>
https:\/\/docs.gitlab.com\/ee\/update\/index.html#upgrade-paths<\/p>\n

\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1aIPCPU-\u7f51\u7edc\u4e4b\u8def<\/a> » gitlab\u6570\u636e\u8fc1\u79fb\u548c\u5347\u7ea7<\/a><\/p>","protected":false},"excerpt":{"rendered":"

gitlab\u6570\u636e\u8fc1\u79fb\u548c\u5347\u7ea7.md\u6211\u4eec\u7684gitlab\u662f\u53e4\u8001\u7684gitlab 7.6 \u5f00\u53d1\u4eba\u5458\u60f3\u4f7f\u7528\u65b0\u529f\u80fd\uff0c\u8bb0\u5f55\u4e86\u4e0b\u5347\u7ea7\u8fc7\u7a0b\u3002 \u4e00\u3001gitlab\u5907\u4efd\u6570\u636e gitlab-rakegitlab:backup:create \u9ed8\u8ba4\u5907\u4efd\u76ee\u5f55\u662f\/var\/opt\/gitlab\/backups\uff0c\u53ef\u4ee5\u5728gitlab.rb\u4e2d\u4fee\u6539\u3002 \u4e8c\u3001gitlab\u6062\u590d\u6570\u636e gitlab-ctl stop unicorn gitlab-ctl stop sidekiq #@\u4e0d\u8981\u5168\u505c\uff0c\u6570\u636e\u5e93\u5f97\u542f\u52a8\u7740 gitlab-rake gitlab:backup:restore BACKUP=1557685869 #@\u6062\u590d\u65f6\uff0c\u4e0d\u8981\u6307\u5168\u540d\uff0c\u53ea\u5199\u65f6\u95f4\u6233\u90e8\u5206 gitlab-ctl reconfigure \u6ce8\u610f\uff1a\u6062\u590d\u6570\u636e\u65f6\uff0cgitlab\u7248\u672c\u5fc5\u987b\u548c\u5907\u4efd\u65f6\u7684\u7248\u672c\u4e00\u81f4\uff0c\u8981\u4e0d\u7136\u65e0\u6cd5\u6062\u590d\u3002 \u4e09\u3001\u7248\u672c\u5347\u7ea7 gitlab\u7248\u672c\u5347\u7ea7\u65f6\uff0c\u552f\u4e00\u9700\u8981\u6ce8\u610f\u7684\u5c31\u662f\u9010\u4e2a\u5927\u7248\u672c\u5347\u7ea7\uff0c\u5982\u4e0b 3.1 \u5347\u7ea7\u5230gitlab-ce-7.12.2~omnibus yum localinstall gitlab-ce-7.12.2~omnibus.1-1.x86_64.rpm sudo ln -sf \/opt\/gitlab\/bin\/gitlab-ctl \/opt\/gitlab\/bin\/gitlab-rake \/opt\/gitlab\/bin\/gitlab-rails \/opt\/gitlab\/bin\/gitlab-ci-rake \/opt\/gitlab\/bin\/gitlab-ci-rails \/usr\/bin\/ gitlab-ctl reconfigure #@\u5982\u679c\u62a5500\u9519\u8bef\uff0c\u6267\u884c\u4e0b\u4e0b\u9762\u7684\u8bed\u53e5 gitlab-rake db:migrate gitlab-ctl restart 3.2 \u5347\u7ea7\u52308\u7248\u672c yum localinstall gitlab-ce-8.10.0-ce.1.el7.x86_64.rpm yum localinstall gitlab-ce-8.17.7-ce.0.el7.x86_64.rpm 3.3 \u5347\u7ea7\u52309\u300110\u7248\u672c 9\u7248\u672c\u548c10\u7248\u672c\u53ea\u662f\u4e00\u4e2a\u4e2d\u95f4\u7248\u672c\uff0c\u4f46\u662f\u4e5f\u7ed5\u4e0d\u8fc7\u53bb\uff0c9-10\u7248\u672c\u7684\u6700\u5927\u53d8\u66f4\u662fPostgreSQL\u7248\u672c\u7684\u5347\u7ea7\u3002 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,13],"tags":[232],"_links":{"self":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/1623"}],"collection":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/comments?post=1623"}],"version-history":[{"count":4,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/1623\/revisions"}],"predecessor-version":[{"id":1914,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/1623\/revisions\/1914"}],"wp:attachment":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/media?parent=1623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/categories?post=1623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/tags?post=1623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}