{"id":18725,"date":"2024-11-19T15:57:00","date_gmt":"2024-11-19T07:57:00","guid":{"rendered":"https:\/\/fwq.ai\/blog\/18725\/"},"modified":"2024-11-19T15:57:00","modified_gmt":"2024-11-19T07:57:00","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8ubuntu%e4%b8%8a%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%aegitlab","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/18725\/","title":{"rendered":"\u5982\u4f55\u5728Ubuntu\u4e0a\u5b89\u88c5\u914d\u7f6eGitLab"},"content":{"rendered":"<p>gitlab\u662f\u4e00\u4e2a\u5728\u7ebfgit\u4ed3\u5e93\u7ba1\u7406\u7cfb\u7edf\uff0c\u53ef\u7528\u4e8e\u56e2\u961f\u534f\u4f5c\u5f00\u53d1\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728ubuntu 18.04\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u548c\u914d\u7f6egitlab\u3002<\/p>\n<h2>\u51c6\u5907\u5de5\u4f5c\uff1a<\/h2>\n<ol>\n<li>\u4e00\u53f0\u8fd0\u884cUbuntu 18.04\u7684\u670d\u52a1\u5668\u3002<\/li>\n<li>\u9759\u6001IP\u5730\u5740\u3002<\/li>\n<li>\u5177\u6709sudo\u6743\u9650\u7684\u7528\u6237\u3002<\/li>\n<\/ol>\n<h2>\u6b65\u9aa4\u4e00\uff1a\u66f4\u65b0\u670d\u52a1\u5668<\/h2>\n<p>\u9996\u5148\uff0c\u5728\u7ec8\u7aef\u4e2d\u767b\u5f55\u5230\u670d\u52a1\u5668\u5e76\u66f4\u65b0\u8f6f\u4ef6\u5305\u3002<\/p>\n<pre>sudo apt-get update\nsudo apt-get upgrade<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<h2>\u6b65\u9aa4\u4e8c\uff1a\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56<\/h2>\n<p>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u5b89\u88c5GitLab\u6240\u9700\u7684\u4f9d\u8d56\u9879\uff1a<\/p>\n<pre>sudo apt-get install -y curl openssh-server ca-certificates\nsudo apt-get install -y postfix<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5728\u5b89\u88c5Postfix\u65f6\uff0c\u60a8\u5c06\u88ab\u8981\u6c42\u8f93\u5165\u60a8\u7684\u90ae\u4ef6\u670d\u52a1\u5668\u8bbe\u7f6e\u3002\u5728\u672c\u4f8b\u4e2d\uff0c\u6211\u4eec\u5c06\u4f7f\u7528Internet Site\u3002<\/p>\n<h2>\u6b65\u9aa4\u4e09\uff1a\u6dfb\u52a0GitLab\u4ed3\u5e93<\/h2>\n<p>\u6dfb\u52a0GitLab\u4ed3\u5e93\u4ee5\u83b7\u53d6\u6700\u65b0\u7248\u672c\u7684GitLab\u3002<\/p>\n<pre>curl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ee\/script.deb.sh | sudo bash<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<h2>\u6b65\u9aa4\u56db\uff1a\u5b89\u88c5GitLab<\/h2>\n<p>\u4ee5\u4e0b\u547d\u4ee4\u5c06\u5b89\u88c5GitLab\uff1a<\/p>\n<pre>sudo EXTERNAL_URL=\"http:\/\/gitlab.example.com\" apt-get install gitlab-ee<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u8bf7\u6ce8\u610f\uff0c\u60a8\u9700\u8981\u5c06EXTERNAL_URL\u66ff\u6362\u4e3a\u60a8\u7684\u57df\u540d\u6216IP\u5730\u5740\u3002\u7b49\u5f85\u5b89\u88c5\u5b8c\u6210\uff0c\u8fd9\u53ef\u80fd\u9700\u8981\u4e00\u4e9b\u65f6\u95f4\u3002<\/p>\n<h2>\u6b65\u9aa4\u4e94\uff1a\u8bbf\u95eeGitLab<\/h2>\n<p>\u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u60a8\u7684Web\u6d4f\u89c8\u5668\u8bbf\u95eeGitLab\uff0c\u8be5\u6d4f\u89c8\u5668\u5fc5\u987b\u4e0e\u60a8\u7684\u670d\u52a1\u5668\u4f4d\u4e8e\u540c\u4e00\u7f51\u7edc\u4e2d\u3002<\/p>\n<pre>http:\/\/your-ip-address<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6309\u7167\u4e0b\u9762\u7684\u5c4f\u5e55\u63d0\u793a\u8fdb\u884c\u521d\u59cb\u5316\u8bbe\u7f6e\u3002<\/p>\n<h2>\u6b65\u9aa4\u516d\uff1a\u914d\u7f6eGitLab<\/h2>\n<p>\u9996\u6b21\u542f\u52a8GitLab\u65f6\uff0c\u60a8\u9700\u8981\u8fdb\u884c\u4e00\u4e9b\u57fa\u672c\u914d\u7f6e\u3002\u8f6c\u5230gitlab.example.com\u5e76\u521b\u5efa\u60a8\u7684\u7ba1\u7406\u5458\u5e10\u6237\u3002\u5728\u767b\u5f55\u540e\uff0c\u60a8\u53ef\u4ee5\u66f4\u6539\u4efb\u4f55\u5176\u4ed6GitLab\u914d\u7f6e\u9009\u9879\u3002<\/p>\n<h2>\u7ed3\u8bba\uff1a<\/h2>\n<p>\u606d\u559c\u60a8\uff01\u60a8\u5df2\u6210\u529f\u5730\u5728Ubuntu 18.04\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u548c\u914d\u7f6e\u4e86GitLab\u3002\u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528GitLab\u6765\u6709\u6548\u5730\u534f\u4f5c\u5f00\u53d1\u548c\u7ba1\u7406\u4ee3\u7801\u5e93\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5728Ubuntu\u4e0a\u5b89\u88c5\u914d\u7f6eGitLab\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>gitlab\u662f\u4e00\u4e2a\u5728\u7ebfgit\u4ed3\u5e93\u7ba1\u7406\u7cfb\u7edf\uff0c\u53ef\u7528\u4e8e\u56e2\u961f\u534f\u4f5c\u5f00\u53d1\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728ubuntu 18.04\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u548c\u914d\u7f6egitlab\u3002 \u51c6\u5907\u5de5\u4f5c\uff1a \u4e00\u53f0\u8fd0\u884cUbuntu 18.04\u7684\u670d\u52a1\u5668\u3002 \u9759\u6001IP\u5730\u5740\u3002 \u5177\u6709sudo\u6743\u9650\u7684\u7528\u6237\u3002 \u6b65\u9aa4\u4e00\uff1a\u66f4\u65b0\u670d\u52a1\u5668 \u9996\u5148\uff0c\u5728\u7ec8\u7aef\u4e2d\u767b\u5f55\u5230\u670d\u52a1\u5668\u5e76\u66f4\u65b0\u8f6f\u4ef6\u5305\u3002 sudo apt-get update sudo apt-get upgrade \u767b\u5f55\u540e\u590d\u5236 \u6b65\u9aa4\u4e8c\uff1a\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56 \u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u5b89\u88c5GitLab\u6240\u9700\u7684\u4f9d\u8d56\u9879\uff1a sudo apt-get install -y curl openssh-server ca-certificates sudo apt-get install -y postfix \u767b\u5f55\u540e\u590d\u5236 \u5728\u5b89\u88c5Postfix\u65f6\uff0c\u60a8\u5c06\u88ab\u8981\u6c42\u8f93\u5165\u60a8\u7684\u90ae\u4ef6\u670d\u52a1\u5668\u8bbe\u7f6e\u3002\u5728\u672c\u4f8b\u4e2d\uff0c\u6211\u4eec\u5c06\u4f7f\u7528Internet Site\u3002 \u6b65\u9aa4\u4e09\uff1a\u6dfb\u52a0GitLab\u4ed3\u5e93 \u6dfb\u52a0GitLab\u4ed3\u5e93\u4ee5\u83b7\u53d6\u6700\u65b0\u7248\u672c\u7684GitLab\u3002 curl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ee\/script.deb.sh | sudo bash \u767b\u5f55\u540e\u590d\u5236 \u6b65\u9aa4\u56db\uff1a\u5b89\u88c5GitLab \u4ee5\u4e0b\u547d\u4ee4\u5c06\u5b89\u88c5GitLab\uff1a sudo EXTERNAL_URL=&#8221;http:\/\/gitlab.example.com&#8221; apt-get install gitlab-ee \u767b\u5f55\u540e\u590d\u5236 \u8bf7\u6ce8\u610f\uff0c\u60a8\u9700\u8981\u5c06EXTERNAL_URL\u66ff\u6362\u4e3a\u60a8\u7684\u57df\u540d\u6216IP\u5730\u5740\u3002\u7b49\u5f85\u5b89\u88c5\u5b8c\u6210\uff0c\u8fd9\u53ef\u80fd\u9700\u8981\u4e00\u4e9b\u65f6\u95f4\u3002 \u6b65\u9aa4\u4e94\uff1a\u8bbf\u95eeGitLab \u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u60a8\u7684Web\u6d4f\u89c8\u5668\u8bbf\u95eeGitLab\uff0c\u8be5\u6d4f\u89c8\u5668\u5fc5\u987b\u4e0e\u60a8\u7684\u670d\u52a1\u5668\u4f4d\u4e8e\u540c\u4e00\u7f51\u7edc\u4e2d\u3002 http:\/\/your-ip-address \u767b\u5f55\u540e\u590d\u5236 \u6309\u7167\u4e0b\u9762\u7684\u5c4f\u5e55\u63d0\u793a\u8fdb\u884c\u521d\u59cb\u5316\u8bbe\u7f6e\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-18725","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=18725"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18725\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=18725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=18725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=18725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}