{"id":1815,"date":"2024-06-14T11:56:13","date_gmt":"2024-06-14T03:56:13","guid":{"rendered":"https:\/\/diuut.com\/?p=1815"},"modified":"2024-06-14T11:57:39","modified_gmt":"2024-06-14T03:57:39","slug":"ubuntu%e5%86%85%e7%bd%91%e7%a6%bb%e7%ba%bf%e5%ae%89%e8%a3%85gitlab%e4%bb%a5%e5%8f%8a%e6%81%a2%e5%a4%8d%e5%a4%87%e4%bb%bd","status":"publish","type":"post","link":"https:\/\/diuut.com\/?p=1815","title":{"rendered":"Ubuntu\u5185\u7f51\u79bb\u7ebf\u5b89\u88c5Gitlab\u4ee5\u53ca\u6062\u590d\u5907\u4efd"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote\"><p>\u9700\u6c42<\/p><cite>\u670d\u52a1\u5668\u4ececentos\u8fc1\u79fb\u81f3Ubuntu\uff0c\u539f\u6765\u7684gitlab\u6570\u636e\u9700\u8981\u4fdd\u7559<\/cite><\/blockquote>\n\n\n\n<p>\u8fc1\u79fb\u5907\u4efdgitlab\u6700\u63a8\u8350\u7684\u662f\u540c\u7248\u672c\u5e73\u884c\u6062\u590d\uff0c\u51fa\u95ee\u9898\u7684\u6982\u7387\u76f8\u5bf9\u4e0d\u540c\u7248\u672cgitlab\u800c\u8a00\u5c0f\u5f97\u591a\u3002\u4f46\u4e0d\u540c\u5e73\u53f0\u7684gitlab\u5305\u4e0d\u4e00\u6837\uff0c\u9700\u8981\u5728\u4e0d\u540c\u7cfb\u7edf\u4e0a\u5b89\u88c5\u76f8\u540c\u7248\u672c\u7684gitlab\u7136\u540e\u518d\u6062\u590d\u5907\u4efd\u3002<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_66_1 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\"><p class=\"ez-toc-title\">\u76ee\u5f55<\/p>\n<\/div><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/diuut.com\/?p=1815\/#%E5%A4%87%E4%BB%BD%E6%97%A7%E7%89%88%E6%9C%AC\" title=\"\u5907\u4efd\u65e7\u7248\u672c\">\u5907\u4efd\u65e7\u7248\u672c<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/diuut.com\/?p=1815\/#Ubuntu%E4%B8%8B%E8%BD%BDgitlab%E5%AE%89%E8%A3%85%E5%8C%85\" title=\"Ubuntu\u4e0b\u8f7dgitlab\u5b89\u88c5\u5305\">Ubuntu\u4e0b\u8f7dgitlab\u5b89\u88c5\u5305<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/diuut.com\/?p=1815\/#Ubuntu%E5%AE%89%E8%A3%85gitlab%E5%8C%85\" title=\"Ubuntu\u5b89\u88c5gitlab\u5305\">Ubuntu\u5b89\u88c5gitlab\u5305<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/diuut.com\/?p=1815\/#Ubuntu%E6%81%A2%E5%A4%8Dgitlab%E5%A4%87%E4%BB%BD\" title=\"Ubuntu\u6062\u590dgitlab\u5907\u4efd\">Ubuntu\u6062\u590dgitlab\u5907\u4efd<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%E5%A4%87%E4%BB%BD%E6%97%A7%E7%89%88%E6%9C%AC\"><\/span>\u5907\u4efd\u65e7\u7248\u672c<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u5148\u5728\u539f\u670d\u52a1\u5668\u4e0a\uff0cgitlab\u4fdd\u6301\u8fd0\u884c\u72b6\u6001\uff0c\u6267\u884c\u5907\u4efd\u547d\u4ee4<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n gitlab-rake gitlab:backup:create\n<\/pre><\/div>\n\n\n<p>\u8be5\u547d\u4ee4\u6267\u884c\u540e\u4f1a\u5728 \/var\/opt\/gitlab\/backups \u8def\u5f84\u4e0b\u751f\u6210\u5bf9\u5e94\u7684\u5f53\u524dgitlab\u7684\u5b8c\u6574\u5907\u4efd\u6570\u636e\u3002(\u4f8b\uff1a1679122231_2024_06_41_13.9.7_gitlab_backup.tar)\uff0c\u8fd9\u4e2a\u6587\u4ef6\u5230\u653e\u5230\u8fc1\u79fb\u540e\u7684\u670d\u52a1\u5668\u5bf9\u5e94\u8def\u5f84\u4e2d\u3002<\/p>\n\n\n\n<h2><span class=\"ez-toc-section\" id=\"Ubuntu%E4%B8%8B%E8%BD%BDgitlab%E5%AE%89%E8%A3%85%E5%8C%85\"><\/span>Ubuntu\u4e0b\u8f7dgitlab\u5b89\u88c5\u5305<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u53bb\u5b98\u7f51\u4e0b\u8f7dUbuntu\u5bf9\u5e94\u7684\u7248\u672c\u7684gitlab\u5305\uff0c\u5177\u4f53\u7248\u672c\u53ef\u4ee5\u76f4\u63a5\u53bb\u539f\u6765\u7684gitlab\u5730\u5740\uff0c\u540e\u9762\u52a0\u4e00\u4e2a\/help,\u5c31\u53ef\u4ee5\u770b\u5230\u5177\u4f53\u7248\u672c\u4e86\uff08\u4f8b\uff1ahttp:\/\/xxx.xxx.xxx.xxx:8020\/help\uff09\u3002<\/p>\n\n\n\n<p>\u8fd9\u91cc\u6211\u67e5\u8be2\u51fa\u6211\u5f53\u524d\u7248\u672c\u4e3aGitLab Community Edition 13.9.7\u3002<\/p>\n\n\n\n<p>\u5b98\u7f51\u4e0b\u8f7d\u5730\u5740\uff1a<a rel=\"noreferrer noopener\" href=\"https:\/\/packages.gitlab.com\/gitlab\/gitlab-ce\" target=\"_blank\">https:\/\/packages.gitlab.com\/gitlab\/gitlab-ce<\/a><\/p>\n\n\n\n<p>\u4e0b\u8f7d\u9875\u9762\u53f3\u4e0a\u89d2\u6709search\uff0c\u7b5b\u9009type\u9009\u62e9Deb\uff0c\u7cfb\u7edf\u7c7b\u578b\u5339\u914d\u81ea\u5df1\u5f53\u524d\u7684ubuntu\u7248\u672c(\u4f8b:ubuntu\/bionic)\uff0c\u56de\u8f66\uff0c\u5c31\u53ef\u4ee5\u5728\u4e0b\u9762\u5217\u8868\u4e2d\u627e\u5230\u81ea\u5df1\u7684\u9700\u8981\u7684gitlab\u7684Deb\u5305\u3002<\/p>\n\n\n\n<h2><span class=\"ez-toc-section\" id=\"Ubuntu%E5%AE%89%E8%A3%85gitlab%E5%8C%85\"><\/span>Ubuntu\u5b89\u88c5gitlab\u5305<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u4ee5\u4e0b\u64cd\u4f5c\u6211\u662f\u5728root\u7528\u6237\u4e0b\u6267\u884c\u7684\uff0c\u5982\u679c\u975eroot\u7528\u6237\uff0c\u6ce8\u610f\u76f8\u5173\u6743\u9650\u95ee\u9898\u53ef\u80fd\u4f1a\u62a5\u9519\u3002<\/p>\n\n\n\n<p>\u79bb\u7ebf\u73af\u5883\u4e2d\u5b89\u88c5\u7684\u8bdd\u9996\u5148\u9700\u8981\u5b89\u88c5\u4f9d\u8d56\u5b89\u88c5\u4f9d\u8d56<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nsudo apt install -y curl openssh-server ca-certificates postfix\n<\/pre><\/div>\n\n\n<p>\u5c06\u5b89\u88c5\u5305\u653e\u5230\u5f85\u8fc1\u79fb\u670d\u52a1\u5668\u4e0a\uff0c\u6267\u884c\u5b89\u88c5\u547d\u4ee4<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# Install the dependency packages\nsudo dpkg -i &lt;package_name&gt;.deb\n\n#&lt;package_name&gt;\u4e3a\u4e0a\u4e00\u6b65\u4e0b\u8f7d\u7684gitlab\u5305\u540d\n<\/pre><\/div>\n\n\n<p>\u5b89\u88c5\u5b8c\u6210\u4ee5\u540e\uff0c\u4f1a\u5f39\u51fagitlab\u72d0\u72f8\u7684\u5927logo\uff0c\u5c31\u4ee3\u8868\u5b89\u88c5\u6210\u529f\u4e86\u3002\u63a5\u4e0b\u6765\u6211\u5148\u4fee\u6539\u81ea\u5b9a\u4e49\u7684\u8bbf\u95ee\u5730\u5740\uff0c\u6ce8\u610f\u7b56\u7565\u7ec4\u8bb0\u5f97\u628a\u7aef\u53e3\u63d0\u524d\u6253\u5f00\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\nsudo vi \/etc\/gitlab\/gitlab.rb\n\n#\u914d\u7f6e\u9996\u9875\u5730\u5740\uff08\u5927\u7ea6\u5728\u7b2c15\u884c\uff09\nexternal_url 'http:\/\/xxx.xxx.xxx.xxx:8020'\n\n#\u91cd\u65b0\u914d\u7f6e\u5e76\u542f\u52a8\nsudo gitlab-ctl reconfigure\n\n#\u5b8c\u6210\u540e\u5c06\u4f1a\u770b\u5230\u5982\u4e0b\u8f93\u51fa\nRunning handlers complete\nChef Client finished, 432\/613 resources updated in 03 minutes 43 seconds\ngitlab Reconfigured!\n<\/pre><\/div>\n\n\n<p>\u4fee\u6539\u6210\u529f\u540e\u8bbf\u95ee\u521a\u624d\u8bbe\u7f6e\u7684\u5730\u5740\uff0c\u7b2c\u4e00\u6b21\u8fdb\u5165\u7684\u65f6\u5019\u9ed8\u8ba4root\u7528\u6237\uff0c\u4f1a\u8ba9\u4f60\u8bbe\u7f6eroot\u5bc6\u7801\uff0c\u8fd9\u91cc\u968f\u4fbf\u8bbe\u7f6e\u4e0b\u5c31\u884c\uff0c\u53cd\u6b63\u4e00\u4f1a\u6062\u590d\u5907\u4efd\u540e\u662f\u6309\u7167\u5907\u4efd\u524d\u7684\u7528\u6237\u8d26\u6237\u5bc6\u7801\u3002<\/p>\n\n\n\n<h2><span class=\"ez-toc-section\" id=\"Ubuntu%E6%81%A2%E5%A4%8Dgitlab%E5%A4%87%E4%BB%BD\"><\/span>Ubuntu\u6062\u590dgitlab\u5907\u4efd<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u6062\u590d\u524d\u5148\u505c\u6b62\u76f8\u5173\u670d\u52a1<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ngitlab-ctl stop unicorn\ngitlab-ctl stop sidekiq\n\n#\u5c06\u5907\u4efd\u6587\u4ef6\u653e\u5230\/var\/opt\/gitlab\/backups\u8def\u5f84\u4e2d\uff0c\u7ed9777\u6743\u9650\nchmod 777 ********.tar\n\n#\u6267\u884c\u6062\u590d\u547d\u4ee4\uff0c\u8fd9\u91ccBACKUP\u540e\u9762\u53ea\u9700\u8981\u5e26\u65f6\u95f4\u6233\u5c31\u884c\uff0c_gitlab_backup.tar\u5c31\u4e0d\u7528\u4e86\ngitlab-rake gitlab:backup:restore BACKUP=1530156812_2018_06_28_10.8.4\n<\/pre><\/div>\n\n\n<p>\u540e\u7eed\u6309\u7167\u63d0\u793a\u8f93\u5165yes\u786e\u8ba4\u7ee7\u7eed\u5373\u523b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#\u542f\u52a8gitlab\ngitlab-ctl start \n<\/pre><\/div>\n\n\n<p>\u5907\u4efd\u6d41\u7a0b\u7ed3\u675f\u540e\u518d\u6b21\u542f\u52a8gitlab\uff0c\u7528\u65e7\u7684\u8d26\u6237\u6d4b\u8bd5\u767b\u5f55\u4e0b\uff0c\u68c0\u67e5\u4e0b\u4ed3\u5e93\u9879\u76ee\u662f\u5426\u5b8c\u5168\u6062\u590d\u3002over\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>\u76f8\u5173\u53c2\u8003<\/p><cite><a rel=\"noreferrer noopener\" href=\"https:\/\/docs.gitlab.com\/ee\/topics\/offline\/quick_start_guide.html\" target=\"_blank\">https:\/\/docs.gitlab.com\/ee\/topics\/offline\/quick_start_guide.html<\/a><br><a href=\"https:\/\/cloud.tencent.com\/developer\/article\/1622317\">https:\/\/cloud.tencent.com\/developer\/article\/1622317<\/a><\/cite><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u9700\u6c42 \u670d\u52a1\u5668\u4ececentos\u8fc1\u79fb\u81f3Ubuntu\uff0c\u539f\u6765\u7684gitlab\u6570\u636e\u9700\u8981\u4fdd\u7559 \u8fc1\u79fb\u5907\u4efdgitlab\u6700\u63a8\u8350\u7684\u662f\u540c<span class=\"more-button\"><a href=\"https:\/\/diuut.com\/?p=1815\" class=\"more-link\">view all . . .<span class=\"screen-reader-text\">Ubuntu\u5185\u7f51\u79bb\u7ebf\u5b89\u88c5Gitlab\u4ee5\u53ca\u6062\u590d\u5907\u4efd<\/span><\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":1818,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[69,68],"_links":{"self":[{"href":"https:\/\/diuut.com\/index.php?rest_route=\/wp\/v2\/posts\/1815"}],"collection":[{"href":"https:\/\/diuut.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/diuut.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/diuut.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/diuut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1815"}],"version-history":[{"count":1,"href":"https:\/\/diuut.com\/index.php?rest_route=\/wp\/v2\/posts\/1815\/revisions"}],"predecessor-version":[{"id":1817,"href":"https:\/\/diuut.com\/index.php?rest_route=\/wp\/v2\/posts\/1815\/revisions\/1817"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/diuut.com\/index.php?rest_route=\/wp\/v2\/media\/1818"}],"wp:attachment":[{"href":"https:\/\/diuut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/diuut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/diuut.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}