{"id":19296,"date":"2024-11-19T16:38:10","date_gmt":"2024-11-19T08:38:10","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19296\/"},"modified":"2024-11-19T16:38:10","modified_gmt":"2024-11-19T08:38:10","slug":"%e8%af%a6%e8%a7%a3gitlab%e7%9a%84%e5%ae%89%e8%a3%85%e6%95%99%e7%a8%8b%ef%bc%88centos%e7%b3%bb%e7%bb%9f%ef%bc%89","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19296\/","title":{"rendered":"\u8be6\u89e3gitlab\u7684\u5b89\u88c5\u6559\u7a0b\uff08centos\u7cfb\u7edf\uff09"},"content":{"rendered":"<p>\u5728linux\u670d\u52a1\u5668\u4e0a\uff0cgitlab\u662f\u4e00\u79cd\u5fc5\u5907\u5de5\u5177\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u6258\u7ba1\u4ee3\u7801\u3001\u9879\u76ee\u7ba1\u7406\u548c\u7248\u672c\u63a7\u5236\u7684\u5e73\u53f0\u3002\u901a\u8fc7gitlab\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5730\u90e8\u7f72\u3001\u5b58\u50a8\u548c\u7ba1\u7406\u4f60\u7684\u4ee3\u7801\uff0c\u4ee5\u53ca\u8fdb\u884c\u534f\u4f5c\u5f00\u53d1\u3002<\/p>\n<p>\u672c\u6587\u5c06\u5411\u4f60\u5c55\u793a\u5982\u4f55\u5728CentOS\u4e0a\u5b89\u88c5GitLabCE\u7684\u8fc7\u7a0b\u3002<\/p>\n<p><strong>\u524d\u7f6e\u6761\u4ef6\uff1a<\/strong><\/p>\n<ul>\n<li>CentOS\u670d\u52a1\u5668<\/li>\n<li>root\u6743\u9650<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa41\uff1a \u5b89\u88c5\u4f9d\u8d56\u5305<\/strong><\/p>\n<p>\u5728\u5b89\u88c5GitLabCE\u4e4b\u524d\uff0c\u9700\u8981\u5b89\u88c5\u6240\u9700\u7684\u4f9d\u8d56\u9879\u548c\u5de5\u5177\u3002\u4ee5\u4e0b\u662f\u5b89\u88c5\u8fc7\u7a0b\uff1a<\/p>\n<pre>yum install curl policycoreutils openssh-server openssh-clients\nsystemctl enable sshd\nsystemctl start sshd\nfirewall-cmd --permanent --add-service=http\nsystemctl reload firewalld<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p><strong>\u6b65\u9aa42\uff1a \u5b89\u88c5GitLab<\/strong><\/p>\n<p>\u9996\u5148\uff0c\u8981\u4e3aGitLabCE\u6dfb\u52a0rpm\u4ed3\u5e93\u3002\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>curl -sS https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.rpm.sh | sudo bash<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5b89\u88c5GitLabCE\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u60a8\u7684\u7cfb\u7edf\u662f\u6700\u65b0\u7684\u3002 \u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>yum update<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5GitLabCE\uff1a<\/p>\n<pre>sudo yum install gitlab-ce<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u8fd0\u884c\u547d\u4ee4\u542f\u52a8gitlab\uff1a<\/p>\n<pre>sudo gitlab-ctl reconfigure<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p><strong>\u6b65\u9aa43\uff1a \u8bbf\u95eeGitLab<\/strong><\/p>\n<p>\u5728\u6240\u6709\u8bbe\u7f6e\u5b8c\u6210\u4e4b\u540e\uff0c\u4f60\u73b0\u5728\u53ef\u4ee5\u4f7f\u7528\u6d4f\u89c8\u5668\u8bbf\u95eeGitLab\u7f51\u7ad9\u3002\u8bbf\u95eeurl\u4e3a\uff1ahttp:\/\/  \/  \u3002  <\/p>\n<p>\u5728\u4f60\u7b2c\u4e00\u6b21\u8bbf\u95eeGitLab\u65f6\uff0c\u5c06\u8981\u6c42\u4f60\u521b\u5efa\u65b0\u7684\u7ba1\u7406\u5458\u8d26\u6237\u548c\u8bbe\u7f6e\u5bc6\u7801\u3002<\/p>\n<p>\u5b8c\u6210\u4e0a\u8ff0\u6b65\u9aa4\u540e\uff0cGitLabCE\u5c31\u51c6\u5907\u597d\u4e86\u4f7f\u7528\u3002<\/p>\n<p>\u672c\u6587\u7ed3\u675f\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u8be6\u89e3gitlab\u7684\u5b89\u88c5\u6559\u7a0b\uff08centos\u7cfb\u7edf\uff09\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>\u5728linux\u670d\u52a1\u5668\u4e0a\uff0cgitlab\u662f\u4e00\u79cd\u5fc5\u5907\u5de5\u5177\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u6258\u7ba1\u4ee3\u7801\u3001\u9879\u76ee\u7ba1\u7406\u548c\u7248\u672c\u63a7\u5236\u7684\u5e73\u53f0\u3002\u901a\u8fc7gitlab\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5730\u90e8\u7f72\u3001\u5b58\u50a8\u548c\u7ba1\u7406\u4f60\u7684\u4ee3\u7801\uff0c\u4ee5\u53ca\u8fdb\u884c\u534f\u4f5c\u5f00\u53d1\u3002 \u672c\u6587\u5c06\u5411\u4f60\u5c55\u793a\u5982\u4f55\u5728CentOS\u4e0a\u5b89\u88c5GitLabCE\u7684\u8fc7\u7a0b\u3002 \u524d\u7f6e\u6761\u4ef6\uff1a CentOS\u670d\u52a1\u5668 root\u6743\u9650 \u6b65\u9aa41\uff1a \u5b89\u88c5\u4f9d\u8d56\u5305 \u5728\u5b89\u88c5GitLabCE\u4e4b\u524d\uff0c\u9700\u8981\u5b89\u88c5\u6240\u9700\u7684\u4f9d\u8d56\u9879\u548c\u5de5\u5177\u3002\u4ee5\u4e0b\u662f\u5b89\u88c5\u8fc7\u7a0b\uff1a yum install curl policycoreutils openssh-server openssh-clients systemctl enable sshd systemctl start sshd firewall-cmd &#8211;permanent &#8211;add-service=http systemctl reload firewalld \u767b\u5f55\u540e\u590d\u5236 \u6b65\u9aa42\uff1a \u5b89\u88c5GitLab \u9996\u5148\uff0c\u8981\u4e3aGitLabCE\u6dfb\u52a0rpm\u4ed3\u5e93\u3002\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a curl -sS https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.rpm.sh | sudo bash \u767b\u5f55\u540e\u590d\u5236 \u5b89\u88c5GitLabCE\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u60a8\u7684\u7cfb\u7edf\u662f\u6700\u65b0\u7684\u3002 \u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a yum update \u767b\u5f55\u540e\u590d\u5236 \u63a5\u4e0b\u6765\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5GitLabCE\uff1a sudo yum install gitlab-ce \u767b\u5f55\u540e\u590d\u5236 \u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u8fd0\u884c\u547d\u4ee4\u542f\u52a8gitlab\uff1a sudo gitlab-ctl reconfigure \u767b\u5f55\u540e\u590d\u5236 \u6b65\u9aa43\uff1a \u8bbf\u95eeGitLab [&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-19296","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19296","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=19296"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19296\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}