{"id":19298,"date":"2024-11-19T16:54:05","date_gmt":"2024-11-19T08:54:05","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19298\/"},"modified":"2024-11-19T16:54:05","modified_gmt":"2024-11-19T08:54:05","slug":"%e6%b5%85%e6%9e%90ubuntu%e6%93%8d%e4%bd%9c%e7%b3%bb%e7%bb%9f%e4%b8%8a%e6%80%8e%e4%b9%88%e5%ae%89%e8%a3%85gitlab","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19298\/","title":{"rendered":"\u6d45\u6790Ubuntu\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u600e\u4e48\u5b89\u88c5Gitlab"},"content":{"rendered":"<p>gitlab\u662f\u4e00\u4e2a\u7ba1\u7406git\u4ed3\u5e93\u7684web\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u63d0\u4f9b\u4e86\u7c7b\u4f3c\u4e8egithub\u7684\u529f\u80fd\uff0c\u5305\u62ec\u8d26\u6237\u7ba1\u7406\u3001\u8ba8\u8bba\u3001\u4ee3\u7801\u5ba1\u67e5\u548c\u7248\u672c\u63a7\u5236\u3002gitlab\u662f\u5f00\u6e90\u8f6f\u4ef6\uff0c\u6240\u4ee5\u53ef\u4ee5\u5728\u670d\u52a1\u5668\u4e0a\u81ea\u7531\u5730\u5b89\u88c5\u3002<\/p>\n<p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u6f14\u793a\u5982\u4f55\u5728Ubuntu\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u5b89\u88c5Gitlab\u3002<\/p>\n<p>\u6b65\u9aa4\u4e00\uff1a\u66f4\u65b0Ubuntu\u8f6f\u4ef6\u5305<\/p>\n<p>\u8981\u786e\u4fdd\u7cfb\u7edf\u7684\u8f6f\u4ef6\u5305\u662f\u6700\u65b0\u7684\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u66f4\u65b0\u8f6f\u4ef6\u5305:<\/p>\n<pre>sudo apt-get update\nsudo apt-get upgrade<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6b65\u9aa4\u4e8c\uff1a\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\u9879<\/p>\n<p>Gitlab\u9700\u8981\u5b89\u88c5\u4ee5\u4e0b\u8f6f\u4ef6\u5305:<\/p>\n<ul>\n<li>curl<\/li>\n<li>openssh-server<\/li>\n<li>postfix<\/li>\n<li>ca-certificates<\/li>\n<\/ul>\n<p>\u5728Ubuntu\u4e0a\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u8fd9\u4e9b\u4f9d\u8d56\u9879:<\/p>\n<pre>sudo apt-get install curl openssh-server ca-certificates postfix<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>Postfix\u662f\u4e00\u4e2a\u90ae\u4ef6\u4f20\u8f93\u4ee3\u7406\uff0cGitlab\u4f7f\u7528\u5b83\u6765\u53d1\u9001\u90ae\u4ef6\u901a\u77e5\u3002<\/p>\n<p>\u5728\u8fd0\u884cPostfix\u4e4b\u524d\uff0c\u9700\u8981\u914d\u7f6e\u4e00\u4e2aInternet Site\uff08Internet Site\uff09\u7684\u9009\u9879\uff0c\u8fd9\u6837Postfix\u5c31\u77e5\u9053\u5982\u4f55\u5c06\u90ae\u4ef6\u8def\u7531\u5230\u5176\u5b83\u7535\u5b50\u90ae\u4ef6\u670d\u52a1\u5668\u3002<\/p>\n<p>\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff0c\u7136\u540e\u6309\u7167\u5982\u4e0b\u987a\u5e8f\u9009\u62e9\u7f72\u540d\u548c\u7cfb\u7edf\u90ae\u4ef6\u540d\u79f0\uff08FQDN\uff09\uff1a<\/p>\n<pre>sudo dpkg-reconfigure postfix<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6b65\u9aa4\u4e09\uff1a\u6dfb\u52a0Gitlab\u5b58\u50a8\u5e93<\/p>\n<p>\u5b89\u88c5Gitlab\u9700\u8981\u6dfb\u52a0Gitlab\u5b58\u50a8\u5e93\u3002<\/p>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6dfb\u52a0Gitlab\u5b58\u50a8\u5e93:<\/p>\n<pre>curl -sS https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.deb.sh | sudo bash<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6b65\u9aa4\u56db\uff1a\u5b89\u88c5Gitlab<\/p>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5Gitlab:<\/p>\n<pre>sudo apt-get install gitlab-ce<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4e0a\u8ff0\u547d\u4ee4\u5b89\u88c5\u793e\u533a\u7248Gitlab\u3002\u5982\u679c\u8981\u5b89\u88c5\u4f01\u4e1a\u7248Gitlab\uff0c\u9700\u8981\u4f7f\u7528\u4e0d\u540c\u7684\u547d\u4ee4\u548c\u5b58\u50a8\u5e93\u3002<\/p>\n<p>\u6b65\u9aa4\u4e94\uff1a\u914d\u7f6eGitlab<\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9700\u8981\u914d\u7f6eGitlab\u4ee5\u4f7f\u7528\u7cfb\u7edf\u3002\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8fdb\u5165\u670d\u52a1\u5668\u7684IP\u5730\u5740\u6216\u57df\u540d\uff0c\u8f93\u5165\u4ee5\u4e0b\u7f51\u5740:<\/p>\n<p>http:\/\/\/<\/p>\n<p>\u5728\u7b2c\u4e00\u6b21\u8bbf\u95eeGitlab\u65f6\uff0c\u4f1a\u8981\u6c42\u8bbe\u7f6e\u7ba1\u7406\u5458\u5e10\u6237\u3002<\/p>\n<p>\u8bbe\u7f6e\u5b8c\u6210\u540e\uff0c\u60a8\u5c06\u88ab\u5e26\u5230Gitlab\u7684\u4e3b\u4eea\u8868\u677f\u3002<\/p>\n<p>\u6b65\u9aa4\u516d\uff1a\u8bbf\u95eeGitlab<\/p>\n<p>\u73b0\u5728\uff0c\u53ef\u4ee5\u4f7f\u7528\u6d4f\u89c8\u5668\u8bbf\u95eeGitlab\u3002<\/p>\n<p>\u8fdb\u5165\u4ee5\u4e0bURL\uff1a<\/p>\n<p>http:\/\/\/<\/p>\n<p>\u8f93\u5165\u521a\u521a\u8bbe\u7f6e\u7684\u7ba1\u7406\u5458\u8d26\u6237\u8fdb\u884c\u767b\u5f55\uff0c\u5e76\u521b\u5efa\u56e2\u961f\uff0c\u6dfb\u52a0\u6210\u5458\u548c\u521b\u5efa\u9879\u76ee\uff01<\/p>\n<p>\u7ed3\u8bba<\/p>\n<p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u60a8\u53ef\u4ee5\u8f7b\u677e\u5730\u5728Ubuntu\u4e0a\u5b89\u88c5Gitlab\uff0c\u4ee5\u7ba1\u7406\u60a8\u7684Git\u4ed3\u5e93\u3002\u73b0\u5728\u53ef\u4ee5\u5728\u81ea\u5df1\u7684\u670d\u52a1\u5668\u4e0a\u90e8\u7f72Gitlab\uff0c\u4e3a\u60a8\u7684\u56e2\u961f\u63d0\u4f9b\u66f4\u597d\u7684\u4ee3\u7801\u7ba1\u7406\u4f53\u9a8c\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u6d45\u6790Ubuntu\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u600e\u4e48\u5b89\u88c5Gitlab\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\u7ba1\u7406git\u4ed3\u5e93\u7684web\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u63d0\u4f9b\u4e86\u7c7b\u4f3c\u4e8egithub\u7684\u529f\u80fd\uff0c\u5305\u62ec\u8d26\u6237\u7ba1\u7406\u3001\u8ba8\u8bba\u3001\u4ee3\u7801\u5ba1\u67e5\u548c\u7248\u672c\u63a7\u5236\u3002gitlab\u662f\u5f00\u6e90\u8f6f\u4ef6\uff0c\u6240\u4ee5\u53ef\u4ee5\u5728\u670d\u52a1\u5668\u4e0a\u81ea\u7531\u5730\u5b89\u88c5\u3002 \u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u6f14\u793a\u5982\u4f55\u5728Ubuntu\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u5b89\u88c5Gitlab\u3002 \u6b65\u9aa4\u4e00\uff1a\u66f4\u65b0Ubuntu\u8f6f\u4ef6\u5305 \u8981\u786e\u4fdd\u7cfb\u7edf\u7684\u8f6f\u4ef6\u5305\u662f\u6700\u65b0\u7684\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u66f4\u65b0\u8f6f\u4ef6\u5305: sudo apt-get update sudo apt-get upgrade \u767b\u5f55\u540e\u590d\u5236 \u6b65\u9aa4\u4e8c\uff1a\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\u9879 Gitlab\u9700\u8981\u5b89\u88c5\u4ee5\u4e0b\u8f6f\u4ef6\u5305: curl openssh-server postfix ca-certificates \u5728Ubuntu\u4e0a\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u8fd9\u4e9b\u4f9d\u8d56\u9879: sudo apt-get install curl openssh-server ca-certificates postfix \u767b\u5f55\u540e\u590d\u5236 Postfix\u662f\u4e00\u4e2a\u90ae\u4ef6\u4f20\u8f93\u4ee3\u7406\uff0cGitlab\u4f7f\u7528\u5b83\u6765\u53d1\u9001\u90ae\u4ef6\u901a\u77e5\u3002 \u5728\u8fd0\u884cPostfix\u4e4b\u524d\uff0c\u9700\u8981\u914d\u7f6e\u4e00\u4e2aInternet Site\uff08Internet Site\uff09\u7684\u9009\u9879\uff0c\u8fd9\u6837Postfix\u5c31\u77e5\u9053\u5982\u4f55\u5c06\u90ae\u4ef6\u8def\u7531\u5230\u5176\u5b83\u7535\u5b50\u90ae\u4ef6\u670d\u52a1\u5668\u3002 \u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff0c\u7136\u540e\u6309\u7167\u5982\u4e0b\u987a\u5e8f\u9009\u62e9\u7f72\u540d\u548c\u7cfb\u7edf\u90ae\u4ef6\u540d\u79f0\uff08FQDN\uff09\uff1a sudo dpkg-reconfigure postfix \u767b\u5f55\u540e\u590d\u5236 \u6b65\u9aa4\u4e09\uff1a\u6dfb\u52a0Gitlab\u5b58\u50a8\u5e93 \u5b89\u88c5Gitlab\u9700\u8981\u6dfb\u52a0Gitlab\u5b58\u50a8\u5e93\u3002 \u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6dfb\u52a0Gitlab\u5b58\u50a8\u5e93: curl -sS https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.deb.sh | sudo bash \u767b\u5f55\u540e\u590d\u5236 \u6b65\u9aa4\u56db\uff1a\u5b89\u88c5Gitlab \u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5Gitlab: sudo apt-get install gitlab-ce \u767b\u5f55\u540e\u590d\u5236 \u4e0a\u8ff0\u547d\u4ee4\u5b89\u88c5\u793e\u533a\u7248Gitlab\u3002\u5982\u679c\u8981\u5b89\u88c5\u4f01\u4e1a\u7248Gitlab\uff0c\u9700\u8981\u4f7f\u7528\u4e0d\u540c\u7684\u547d\u4ee4\u548c\u5b58\u50a8\u5e93\u3002 \u6b65\u9aa4\u4e94\uff1a\u914d\u7f6eGitlab \u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9700\u8981\u914d\u7f6eGitlab\u4ee5\u4f7f\u7528\u7cfb\u7edf\u3002\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8fdb\u5165\u670d\u52a1\u5668\u7684IP\u5730\u5740\u6216\u57df\u540d\uff0c\u8f93\u5165\u4ee5\u4e0b\u7f51\u5740: [&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-19298","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19298","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=19298"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19298\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}