{"id":19034,"date":"2024-11-19T10:54:11","date_gmt":"2024-11-19T02:54:11","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19034\/"},"modified":"2024-11-19T10:54:11","modified_gmt":"2024-11-19T02:54:11","slug":"%e4%b8%80%e6%96%87%e8%af%a6%e8%a7%a3%e6%80%8e%e4%b9%88%e5%ae%89%e8%a3%85gitlab7","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19034\/","title":{"rendered":"\u4e00\u6587\u8be6\u89e3\u600e\u4e48\u5b89\u88c5gitlab7"},"content":{"rendered":"<p>\u5b89\u88c5gitlab 7<\/p>\n<p>GitLab \u662f\u4e00\u4e2a\u5f00\u6e90\u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\uff0c\u53ef\u4ee5\u5e2e\u52a9\u56e2\u961f\u534f\u4f5c\u5f00\u53d1\u9879\u76ee\u3002\u5b89\u88c5 GitLab \u7b80\u5355\u4e14\u53ef\u4ee5\u5728\u5c11\u91cf\u786c\u4ef6\u8d44\u6e90\u4e0b\u8fd0\u884c\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728 CentOS 7 \u4e0a\u5b89\u88c5 GitLab 7\u3002<\/p>\n<p>\u5b89\u88c5\u4f9d\u8d56\u9879<\/p>\n<p>\u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u5fc5\u8981\u7684\u4f9d\u8d56\u9879\uff0c\u4ee5\u4f7f GitLab \u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<pre>sudo yum install curl openssh-server postfix cronie\nsudo systemctl enable postfix\nsudo systemctl start postfix\nsudo firewall-cmd --permanent --add-service=http\nsudo systemctl reload firewalld<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u4e3a GitLab \u5b89\u88c5\u5fc5\u8981\u7684\u5305:<\/p>\n<pre>curl -sS https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.rpm.sh | sudo bash\nsudo yum install gitlab-ce<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u914d\u7f6e GitLab<\/p>\n<p>\u5b8c\u6210\u5b89\u88c5\u540e\uff0c\u5fc5\u987b\u914d\u7f6e GitLab\u3002\u6253\u5f00 GitLab \u914d\u7f6e\u6587\u4ef6\uff0c\u8fdb\u884c\u5fc5\u8981\u7684\u66f4\u6539:<\/p>\n<pre>sudo vim \/etc\/gitlab\/gitlab.rb<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u7f16\u8f91 externa_url \u53c2\u6570\uff0c\u8bbe\u7f6e GitLab \u7684 URL \u5730\u5740\u3002<\/p>\n<pre>external_url 'http:\/\/gitlab.example.com'<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4e5f\u53ef\u4ee5\u5c06\u5b83\u8bbe\u7f6e\u4e3a\u670d\u52a1\u5668\u7684 IP \u5730\u5740\u3002<\/p>\n<pre>external_url 'http:\/\/SERVER_IP_ADDRESS'<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4fdd\u5b58\u5e76\u5173\u95ed\u6587\u4ef6\u3002\u8fd0\u884c\u547d\u4ee4\u4ee5\u91cd\u65b0\u914d\u7f6e GitLab \u5e76\u542f\u52a8 GitLab :<\/p>\n<pre>sudo gitlab-ctl reconfigure\nsudo gitlab-ctl start<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cGitLab \u5b89\u88c5\u5728 \/opt\/gitlab \u76ee\u5f55\u4e0b\u3002\u5982\u679c\u9700\u8981\u67e5\u770b GitLab \u7684\u65e5\u5fd7\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4:<\/p>\n<pre>sudo less \/var\/log\/gitlab\/&lt;component_name&gt;\/*.log<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u73b0\u5728\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee\u914d\u7f6e\u7684 URL \u5730\u5740\uff0c\u6253\u5f00 GitLab\u3002\u9996\u6b21\u8bbf\u95ee\u9700\u8981\u8bbe\u7f6e\u7ba1\u7406\u5458\u8d26\u6237\u3002\u767b\u5f55\u540e\u5373\u53ef\u521b\u5efa\u9879\u76ee\u5e76\u5f00\u59cb\u4f7f\u7528 GitLab\u3002<\/p>\n<p>\u7ed3\u8bba<\/p>\n<p>\u672c\u6587\u4ecb\u7ecd\u5982\u4f55\u5728 CentOS 7 \u4e0a\u5b89\u88c5 GitLab 7\u3002\u5b89\u88c5 GitLab \u53ef\u4ee5\u65b9\u4fbf\u5f00\u53d1\u56e2\u961f\u8fdb\u884c\u4ee3\u7801\u6258\u7ba1\u548c\u534f\u4f5c\uff0c\u5e76\u4e3a\u60a8\u7684\u56e2\u961f\u63d0\u4f9b\u4e00\u4e2a\u5b8c\u6574\u7684\u5f00\u53d1\u73af\u5883\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u4e00\u6587\u8be6\u89e3\u600e\u4e48\u5b89\u88c5gitlab7\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>\u5b89\u88c5gitlab 7 GitLab \u662f\u4e00\u4e2a\u5f00\u6e90\u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\uff0c\u53ef\u4ee5\u5e2e\u52a9\u56e2\u961f\u534f\u4f5c\u5f00\u53d1\u9879\u76ee\u3002\u5b89\u88c5 GitLab \u7b80\u5355\u4e14\u53ef\u4ee5\u5728\u5c11\u91cf\u786c\u4ef6\u8d44\u6e90\u4e0b\u8fd0\u884c\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728 CentOS 7 \u4e0a\u5b89\u88c5 GitLab 7\u3002 \u5b89\u88c5\u4f9d\u8d56\u9879 \u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u5fc5\u8981\u7684\u4f9d\u8d56\u9879\uff0c\u4ee5\u4f7f GitLab \u6b63\u5e38\u8fd0\u884c\u3002 sudo yum install curl openssh-server postfix cronie sudo systemctl enable postfix sudo systemctl start postfix sudo firewall-cmd &#8211;permanent &#8211;add-service=http sudo systemctl reload firewalld \u767b\u5f55\u540e\u590d\u5236 \u63a5\u4e0b\u6765\uff0c\u4e3a GitLab \u5b89\u88c5\u5fc5\u8981\u7684\u5305: curl -sS https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.rpm.sh | sudo bash sudo yum install gitlab-ce \u767b\u5f55\u540e\u590d\u5236 \u914d\u7f6e GitLab [&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-19034","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19034","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=19034"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19034\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19034"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19034"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}