{"id":19678,"date":"2024-11-19T13:28:44","date_gmt":"2024-11-19T05:28:44","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19678\/"},"modified":"2024-11-19T13:28:44","modified_gmt":"2024-11-19T05:28:44","slug":"%e4%b8%80%e4%b8%aa%e7%ae%80%e5%8d%95%e7%9a%84os7%e5%ae%89%e8%a3%85gitlab%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19678\/","title":{"rendered":"\u4e00\u4e2a\u7b80\u5355\u7684OS7\u5b89\u88c5GitLab\u6559\u7a0b"},"content":{"rendered":"<p>\u8fd1\u5e74\u6765\uff0cgitlab\u5728\u8f6f\u4ef6\u5f00\u53d1\u548c\u4ee3\u7801\u7ba1\u7406\u9886\u57df\u53d8\u5f97\u975e\u5e38\u6d41\u884c\u3002\u4f46\u662f\uff0c\u5bf9\u4e8e\u67d0\u4e9b\u64cd\u4f5c\u7cfb\u7edf\u548c\u7248\u672c\uff0c\u5982os7\uff0c\u5b89\u88c5gitlab\u53ef\u80fd\u4f1a\u6210\u4e3a\u4e00\u4e2a\u672a\u89e3\u4e4b\u8c1c\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u63d0\u4f9b\u4e00\u4e2a\u7b80\u5355\u7684os7\u5b89\u88c5gitlab\u6559\u7a0b\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n<p>\u7b2c\u4e00\u6b65\uff1a\u5b89\u88c5git\u548ccurl<\/p>\n<p>\u5728\u5b89\u88c5GitLab\u4e4b\u524d\uff0c\u60a8\u9700\u8981\u5728OS7\u4e0a\u5b89\u88c5Git\u548cCurl\u3002\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u5b89\u88c5\u8fd9\u4e9b\u8f6f\u4ef6\uff1a<\/p>\n<pre>sudo yum install git curl<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u8bf7\u6ce8\u610f\uff0c\u8fd9\u91cc\u4f7f\u7528\u7684\u662fsudo\u547d\u4ee4\uff0c\u610f\u5473\u7740\u60a8\u9700\u8981\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u8be5\u547d\u4ee4\u3002<\/p>\n<p>\u7b2c\u4e8c\u6b65\uff1a\u5b89\u88c5GitLab\u4f9d\u8d56\u9879<\/p>\n<p>GitLab\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u4f9d\u8d56\u9879\u624d\u80fd\u6b63\u5e38\u8fd0\u884c\u3002\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u8fd9\u4e9b\u4f9d\u8d56\u9879\uff1a<\/p>\n<pre>sudo yum install policycoreutils openssh-server openssh-clients postfix<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u7b2c\u4e09\u6b65\uff1a\u5b89\u88c5GitLab<\/p>\n<p>\u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u5f00\u59cb\u5b89\u88c5GitLab\u4e86\u3002\u8981\u5b89\u88c5GitLab\uff0c\u8bf7\u9996\u5148\u6dfb\u52a0GitLab\u5b58\u50a8\u5e93\u3002\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>curl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ee\/script.rpm.sh | sudo bash<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u7136\u540e\uff0c\u5b89\u88c5GitLab\uff1a<\/p>\n<pre>sudo EXTERNAL_URL=\"http:\/\/gitlab.example.com\" yum install -y gitlab-ee<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u8bf7\u6ce8\u610f\uff0c\u60a8\u9700\u8981\u5c06\u201chttp:\/\/gitlab.example.com\u201d\u66ff\u6362\u4e3a\u7528\u4e8e\u8bbf\u95eeGitLab\u7684URL\u3002<\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u9700\u8981\u91cd\u65b0\u542f\u52a8GitLab\u670d\u52a1\uff1a<\/p>\n<pre>sudo gitlab-ctl reconfigure<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6700\u540e\uff0c\u60a8\u9700\u8981\u91cd\u8d77OS7\uff1a<\/p>\n<pre>sudo init 6<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u7b2c\u56db\u6b65\uff1a\u767b\u5f55GitLab<\/p>\n<p>\u606d\u559c\u60a8\uff01\u73b0\u5728\u5df2\u7ecf\u5728OS7\u4e0a\u6210\u529f\u5b89\u88c5\u4e86GitLab\u3002\u8981\u767b\u5f55\uff0c\u8bf7\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165\u201chttp:\/\/gitlab.example.com\u201d\uff0c\u5e76\u4f7f\u7528\u7ba1\u7406\u5458\u5e10\u6237\u767b\u5f55\u3002<\/p>\n<p>\u7ed3\u8bba<\/p>\n<p>\u5b89\u88c5GitLab\u53ef\u80fd\u770b\u8d77\u6765\u5f88\u68d8\u624b\uff0c\u4f46\u5b9e\u9645\u4e0a\u5b83\u975e\u5e38\u7b80\u5355\u6613\u884c\u3002\u60a8\u53ea\u9700\u8981\u6309\u7167\u4e0a\u9762\u63d0\u5230\u7684\u6b65\u9aa4\u5b89\u88c5\u5fc5\u8981\u7684\u8f6f\u4ef6\u3001\u4f9d\u8d56\u9879\u548cGitLab\u672c\u8eab\u5373\u53ef\u3002\u5982\u6709\u7591\u95ee\uff0c\u8bf7\u53c2\u8003GitLab\u7684\u5b98\u65b9\u6587\u6863\u6216\u5bfb\u6c42\u5e2e\u52a9\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u4e00\u4e2a\u7b80\u5355\u7684OS7\u5b89\u88c5GitLab\u6559\u7a0b\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>\u8fd1\u5e74\u6765\uff0cgitlab\u5728\u8f6f\u4ef6\u5f00\u53d1\u548c\u4ee3\u7801\u7ba1\u7406\u9886\u57df\u53d8\u5f97\u975e\u5e38\u6d41\u884c\u3002\u4f46\u662f\uff0c\u5bf9\u4e8e\u67d0\u4e9b\u64cd\u4f5c\u7cfb\u7edf\u548c\u7248\u672c\uff0c\u5982os7\uff0c\u5b89\u88c5gitlab\u53ef\u80fd\u4f1a\u6210\u4e3a\u4e00\u4e2a\u672a\u89e3\u4e4b\u8c1c\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u63d0\u4f9b\u4e00\u4e2a\u7b80\u5355\u7684os7\u5b89\u88c5gitlab\u6559\u7a0b\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\u3002 \u7b2c\u4e00\u6b65\uff1a\u5b89\u88c5git\u548ccurl \u5728\u5b89\u88c5GitLab\u4e4b\u524d\uff0c\u60a8\u9700\u8981\u5728OS7\u4e0a\u5b89\u88c5Git\u548cCurl\u3002\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u5b89\u88c5\u8fd9\u4e9b\u8f6f\u4ef6\uff1a sudo yum install git curl \u767b\u5f55\u540e\u590d\u5236 \u8bf7\u6ce8\u610f\uff0c\u8fd9\u91cc\u4f7f\u7528\u7684\u662fsudo\u547d\u4ee4\uff0c\u610f\u5473\u7740\u60a8\u9700\u8981\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u8be5\u547d\u4ee4\u3002 \u7b2c\u4e8c\u6b65\uff1a\u5b89\u88c5GitLab\u4f9d\u8d56\u9879 GitLab\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u4f9d\u8d56\u9879\u624d\u80fd\u6b63\u5e38\u8fd0\u884c\u3002\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u8fd9\u4e9b\u4f9d\u8d56\u9879\uff1a sudo yum install policycoreutils openssh-server openssh-clients postfix \u767b\u5f55\u540e\u590d\u5236 \u7b2c\u4e09\u6b65\uff1a\u5b89\u88c5GitLab \u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u5f00\u59cb\u5b89\u88c5GitLab\u4e86\u3002\u8981\u5b89\u88c5GitLab\uff0c\u8bf7\u9996\u5148\u6dfb\u52a0GitLab\u5b58\u50a8\u5e93\u3002\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a curl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ee\/script.rpm.sh | sudo bash \u767b\u5f55\u540e\u590d\u5236 \u7136\u540e\uff0c\u5b89\u88c5GitLab\uff1a sudo EXTERNAL_URL=&#8221;http:\/\/gitlab.example.com&#8221; yum install -y gitlab-ee \u767b\u5f55\u540e\u590d\u5236 \u8bf7\u6ce8\u610f\uff0c\u60a8\u9700\u8981\u5c06\u201chttp:\/\/gitlab.example.com\u201d\u66ff\u6362\u4e3a\u7528\u4e8e\u8bbf\u95eeGitLab\u7684URL\u3002 \u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u9700\u8981\u91cd\u65b0\u542f\u52a8GitLab\u670d\u52a1\uff1a sudo gitlab-ctl reconfigure \u767b\u5f55\u540e\u590d\u5236 \u6700\u540e\uff0c\u60a8\u9700\u8981\u91cd\u8d77OS7\uff1a sudo init 6 \u767b\u5f55\u540e\u590d\u5236 \u7b2c\u56db\u6b65\uff1a\u767b\u5f55GitLab \u606d\u559c\u60a8\uff01\u73b0\u5728\u5df2\u7ecf\u5728OS7\u4e0a\u6210\u529f\u5b89\u88c5\u4e86GitLab\u3002\u8981\u767b\u5f55\uff0c\u8bf7\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165\u201chttp:\/\/gitlab.example.com\u201d\uff0c\u5e76\u4f7f\u7528\u7ba1\u7406\u5458\u5e10\u6237\u767b\u5f55\u3002 \u7ed3\u8bba \u5b89\u88c5GitLab\u53ef\u80fd\u770b\u8d77\u6765\u5f88\u68d8\u624b\uff0c\u4f46\u5b9e\u9645\u4e0a\u5b83\u975e\u5e38\u7b80\u5355\u6613\u884c\u3002\u60a8\u53ea\u9700\u8981\u6309\u7167\u4e0a\u9762\u63d0\u5230\u7684\u6b65\u9aa4\u5b89\u88c5\u5fc5\u8981\u7684\u8f6f\u4ef6\u3001\u4f9d\u8d56\u9879\u548cGitLab\u672c\u8eab\u5373\u53ef\u3002\u5982\u6709\u7591\u95ee\uff0c\u8bf7\u53c2\u8003GitLab\u7684\u5b98\u65b9\u6587\u6863\u6216\u5bfb\u6c42\u5e2e\u52a9\u3002 \u4ee5\u4e0a\u5c31\u662f\u4e00\u4e2a\u7b80\u5355\u7684OS7\u5b89\u88c5GitLab\u6559\u7a0b\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/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-19678","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19678","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=19678"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19678\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}