{"id":18863,"date":"2024-11-19T14:01:01","date_gmt":"2024-11-19T06:01:01","guid":{"rendered":"https:\/\/fwq.ai\/blog\/18863\/"},"modified":"2024-11-19T14:01:01","modified_gmt":"2024-11-19T06:01:01","slug":"%e5%a6%82%e4%bd%95%e5%ae%89%e8%a3%85%e5%92%8c%e9%85%8d%e7%bd%aegitlab7","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/18863\/","title":{"rendered":"\u5982\u4f55\u5b89\u88c5\u548c\u914d\u7f6eGitLab7"},"content":{"rendered":"<p>gitlab\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u56e2\u961f\u66f4\u597d\u5730\u534f\u4f5c\uff0c\u7ba1\u7406\u548c\u90e8\u7f72\u4ee3\u7801\u3002<\/p>\n<p>\u672c\u6587\u5c06\u4e3a\u60a8\u4ecb\u7ecd\u5982\u4f55\u5b89\u88c5\u548c\u914d\u7f6eGitLab7\u3002<\/p>\n<p>\u4e00\u3001\u73af\u5883\u8981\u6c42<\/p>\n<ol>\n<li>\u64cd\u4f5c\u7cfb\u7edf\uff1aCentOS6\/7\u6216Ubuntu14.04\/16.04<\/li>\n<li>\u5185\u5b58\uff1a\u6700\u5c112GB<\/li>\n<li>\u786c\u76d8\uff1a\u81f3\u5c1120GB<\/li>\n<li>\u7f51\u7edc\uff1a\u4e3a\u4e86\u4e0b\u8f7d\u8f6f\u4ef6\u5305\u548c\u66f4\u65b0\u8f6f\u4ef6\u5305\uff0c\u9700\u8981\u5916\u90e8\u7f51\u7edc\u8fde\u63a5<\/li>\n<\/ol>\n<p>\u4e8c\u3001\u5b89\u88c5\u6b65\u9aa4<\/p>\n<p>1.\u5b89\u88c5\u5fc5\u9700\u7684\u8f6f\u4ef6\u5305<\/p>\n<p>\u5728CentOS\u4e0a\uff1a<\/p>\n<pre>sudo yum install curl openssh-server postfix cronie -y\nsudo service postfix start\nsudo chkconfig postfix on\nsudo lokkit -s http -s ssh<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5728Ubuntu\u4e0a\uff1a<\/p>\n<pre>sudo apt-get install curl openssh-server ca-certificates postfix\nsudo service postfix start\nsudo update-rc.d postfix enable<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>2.\u5b89\u88c5GitLab<\/p>\n<p>\u5728CentOS\u4e0a\uff1a<\/p>\n<pre>curl -sS https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.rpm.sh | sudo bash\nsudo yum install gitlab-ce -y<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5728Ubuntu\u4e0a\uff1a<\/p>\n<pre>curl -sS https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.deb.sh | sudo bash\nsudo apt-get install gitlab-ce<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>3.\u914d\u7f6eGitLab<\/p>\n<p>\u7528root\u7528\u6237\u6253\u5f00\/etc\/gitlab\/gitlab.rb\u6587\u4ef6<\/p>\n<pre>sudo nano \/etc\/gitlab\/gitlab.rb<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u627e\u5230\u5e76\u7f16\u8f91\u4ee5\u4e0b\u884c\uff1a<\/p>\n<pre>## external_url 'http:\/\/gitlab.example.com'<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5c06&#8221;gitlab.example.com&#8221;\u66ff\u6362\u4e3a\u60a8\u7684GitLab\u670d\u52a1\u5668\u7684\u5b8c\u6574\u57df\u540d\u3002<\/p>\n<p>\u4fdd\u5b58\u5e76\u5173\u95ed\u6587\u4ef6\u3002<\/p>\n<p>\u91cd\u65b0\u914d\u7f6eGitLab\uff1a<\/p>\n<p>\u5728CentOS\u4e0a\uff1a<\/p>\n<pre>sudo gitlab-ctl reconfigure<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5728Ubuntu\u4e0a\uff1a<\/p>\n<pre>sudo gitlab-ctl reconfigure<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>4.\u542f\u52a8GitLab<\/p>\n<p>\u5728CentOS\u4e0a\uff1a<\/p>\n<pre>sudo gitlab-ctl start<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5728Ubuntu\u4e0a\uff1a<\/p>\n<pre>sudo gitlab-ctl start<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>5.\u8bbf\u95eeGitLab<\/p>\n<p>\u5728\u7f51\u7edc\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165\u60a8\u7684\u670d\u52a1\u5668\u5730\u5740\u6216IP\uff0c\u7136\u540e\u767b\u5f55GitLab\u7ba1\u7406\u5458\u754c\u9762\u3002<\/p>\n<p>\u4e09\u3001\u603b\u7ed3<\/p>\n<p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u60a8\u5df2\u7ecf\u6210\u529f\u5b89\u88c5\u914d\u7f6eGitLab7\u3002GitLab\u5c06\u4f1a\u5e2e\u52a9\u60a8\u66f4\u597d\u5730\u7ba1\u7406\u60a8\u7684\u4ee3\u7801\uff0c\u52a0\u5f3a\u60a8\u7684\u56e2\u961f\u534f\u4f5c\u548c\u8f6f\u4ef6\u5f00\u53d1\u6d41\u7a0b\u3002<\/p>\n<p>\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5b89\u88c5\u548c\u914d\u7f6eGitLab7\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\u5f00\u6e90\u7684\u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u56e2\u961f\u66f4\u597d\u5730\u534f\u4f5c\uff0c\u7ba1\u7406\u548c\u90e8\u7f72\u4ee3\u7801\u3002 \u672c\u6587\u5c06\u4e3a\u60a8\u4ecb\u7ecd\u5982\u4f55\u5b89\u88c5\u548c\u914d\u7f6eGitLab7\u3002 \u4e00\u3001\u73af\u5883\u8981\u6c42 \u64cd\u4f5c\u7cfb\u7edf\uff1aCentOS6\/7\u6216Ubuntu14.04\/16.04 \u5185\u5b58\uff1a\u6700\u5c112GB \u786c\u76d8\uff1a\u81f3\u5c1120GB \u7f51\u7edc\uff1a\u4e3a\u4e86\u4e0b\u8f7d\u8f6f\u4ef6\u5305\u548c\u66f4\u65b0\u8f6f\u4ef6\u5305\uff0c\u9700\u8981\u5916\u90e8\u7f51\u7edc\u8fde\u63a5 \u4e8c\u3001\u5b89\u88c5\u6b65\u9aa4 1.\u5b89\u88c5\u5fc5\u9700\u7684\u8f6f\u4ef6\u5305 \u5728CentOS\u4e0a\uff1a sudo yum install curl openssh-server postfix cronie -y sudo service postfix start sudo chkconfig postfix on sudo lokkit -s http -s ssh \u767b\u5f55\u540e\u590d\u5236 \u5728Ubuntu\u4e0a\uff1a sudo apt-get install curl openssh-server ca-certificates postfix sudo service postfix start sudo update-rc.d postfix enable \u767b\u5f55\u540e\u590d\u5236 2.\u5b89\u88c5GitLab \u5728CentOS\u4e0a\uff1a curl -sS https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.rpm.sh [&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-18863","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18863","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=18863"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18863\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=18863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=18863"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=18863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}