{"id":590,"date":"2023-04-15T18:24:58","date_gmt":"2023-04-15T10:24:58","guid":{"rendered":"http:\/\/www.huerpu.cc:7000\/?p=590"},"modified":"2023-04-15T19:39:00","modified_gmt":"2023-04-15T11:39:00","slug":"pve%e7%b3%bb%e5%88%97%e6%95%99%e7%a8%8b%e4%ba%8c%e5%8d%81%e3%80%81ubuntu22-04%e5%ae%89%e8%a3%85gitlab%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"http:\/\/www.huerpu.cc:7000\/?p=590","title":{"rendered":"PVE\u7cfb\u5217\u6559\u7a0b(\u4e8c\u5341)\u3001ubuntu22.04\u5b89\u88c5gitlab\u670d\u52a1\u5668"},"content":{"rendered":"<h3>PVE\u7cfb\u5217\u6559\u7a0b(\u4e8c\u5341)\u3001ubuntu22.04\u5b89\u88c5gitlab\u670d\u52a1\u5668<\/h3>\n<p>\u4e3a\u4e86\u66f4\u597d\u7684\u6d4f\u89c8\u4f53\u9a8c\uff0c\u6b22\u8fce\u5149\u987e<a href=\"http:\/\/www.huerpu.cc:7000\/\">\u52e4\u594b\u7684\u51ef\u5c14\u68ee\u540c\u5b66\u4e2a\u4eba\u535a\u5ba2http:\/\/www.huerpu.cc:7000<\/a><\/p>\n<h3>\u4e00\u3001GitLab\u5b89\u88c5<\/h3>\n<p>\u670d\u52a1\u5668\u914d\u7f6e4C8G\uff0cUbuntu22.04\u3002<\/p>\n<pre><code class=\"language-shell\">#\u5207\u6362\u5230root\u7528\u6237\nsudo su -\n\n#\u66f4\u65b0\napt update\napt upgrade -y\n\n#\u5b89\u88c5\u548c\u914d\u7f6e\u5fc5\u987b\u7684\u4f9d\u8d56\u9879\napt install build-essential curl file git ca-certificates -y\n\n#\u914d\u7f6e\u6781\u72d0GitLab \u8f6f\u4ef6\u6e90\u955c\u50cf\ncurl -sS https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.deb.sh | sudo bash\n\n#\u4e0b\u8f7dGitLab\u5b89\u88c5\u5305\nwget --content-disposition https:\/\/packages.gitlab.com\/gitlab\/gitlab-ce\/packages\/ubuntu\/bionic\/gitlab-ce_14.1.2-ce.0_amd64.deb\/download.deb\n\n#\u5b89\u88c5\ndpkg -i gitlab-ce_14.1.2-ce.0_amd64.deb<\/code><\/pre>\n<h3>\u4e8c\u3001\u914d\u7f6eGitlab<\/h3>\n<pre><code class=\"language-shell\">#\u52a0\u8f7d\u914d\u7f6e\u6587\u4ef6\ngitlab-ctl reconfigure\n\n#\u914d\u7f6egitlab\u5730\u5740\uff0c\u4fee\u6539external_url\u4e3a&#039;http:\/\/\u670d\u52a1\u5668ip\u5730\u5740:\u7aef\u53e3&#039;\nvim \/etc\/gitlab\/gitlab.rb\nexternal_url &#039;http:\/\/192.168.31.20:2080&#039;\n\n#\u91cd\u65b0\u52a0\u8f7d\u914d\u7f6e\u6587\u4ef6\ngitlab-ctl reconfigure\n\n# \u91cd\u542f\u670d\u52a1\ngitlab-ctl restart\n\n#\u67e5\u770bgitlab\u670d\u52a1\u72b6\u6001\ngitlab-ctl status<\/code><\/pre>\n<h3>\u4e09\u3001\u653e\u884cgitlab\u670d\u52a1\u7aef\u53e3<\/h3>\n<pre><code class=\"language-shell\">#\u653e\u884cgitlab\u670d\u52a1https\u3001http\nufw allow https\nufw allow http\n#\u6211\u8fd9\u91cc\u914d\u7f6e\u7684\u662f2080\u7aef\u53e3\nufw allow 2080\n#\u5f00\u542fufw\nufw enable\n#\u67e5\u770bufw\u72b6\u6001\nufw status<\/code><\/pre>\n<h3>\u56db\u3001\u4fee\u6539root\u5bc6\u7801<\/h3>\n<p>Gitlab\u9ed8\u8ba4\u8d26\u53f7\u7528\u6237\u540d\u4e3aroot\uff0c\u5bc6\u7801\u4f7f\u7528\u4e0b\u9762\u547d\u4ee4\u83b7\u5f97\uff1a<\/p>\n<p>\u767b\u5f55\u8d26\u6237\uff1a<code>root<\/code><\/p>\n<p>\u5bc6\u7801\uff1a<code>QfYw3GVeAgQwx\/2KW6bLJejwQIZTbBn2dPkfhPX2Pwo=<\/code><\/p>\n<pre><code class=\"language-shell\">#\u67e5\u770b\u7b2c\u4e00\u6b21\u5b89\u88c5GitLab\u751f\u6210\u7684\u9ed8\u8ba4\u5bc6\u7801\ncat \/etc\/gitlab\/initial_root_password\nPassword: QfYw3GVeAgQwx\/2KW6bLJejwQIZTbBn2dPkfhPX2Pwo=<\/code><\/pre>\n<p>\u6b64\u65f6\u8bbf\u95ee<code>http:\/\/192.168.31.20:2080<\/code>\u8fdb\u884c\u767b\u5f55\u5e76\u4fee\u6539\u5bc6\u7801\u3002\u56e0\u4e3aGitlab\u5f88\u8017\u5185\u5b58\uff0c\u8c8c\u4f3c\u9700\u89814G\u591a\uff0c\u5efa\u8bae\u7ed98G\uff0c\u5b83\u542f\u52a8\u4e5f\u6709\u70b9\u6162\uff0c\u5982\u679c\u51fa\u73b0502\u53ef\u4ee5\u8010\u5fc3\u7b49\u5f85\u4e00\u4e0b\u5c31\u597d\u5566\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2023\/04\/15\/WX20230415-1820262x.png\" alt=\"WX20230415-182026@2x\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PVE\u7cfb\u5217\u6559\u7a0b(\u4e8c\u5341)\u3001ubuntu22.04\u5b89\u88c5gitlab\u670d\u52a1\u5668 \u4e3a\u4e86\u66f4\u597d\u7684\u6d4f\u89c8\u4f53\u9a8c\uff0c\u6b22\u8fce\u5149\u987e\u52e4\u594b\u7684\u51ef\u5c14\u68ee [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-590","post","type-post","status-publish","format-standard","hentry","category-pve"],"_links":{"self":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=590"}],"version-history":[{"count":2,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/590\/revisions"}],"predecessor-version":[{"id":592,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/590\/revisions\/592"}],"wp:attachment":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=590"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}