{"id":19550,"date":"2024-11-19T10:18:16","date_gmt":"2024-11-19T02:18:16","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19550\/"},"modified":"2024-11-19T10:18:16","modified_gmt":"2024-11-19T02:18:16","slug":"centos7%e6%80%8e%e4%b9%88%e5%ae%89%e8%a3%85gitlab%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19550\/","title":{"rendered":"centos7\u600e\u4e48\u5b89\u88c5gitlab\u670d\u52a1\u5668"},"content":{"rendered":"<p>\u4f5c\u4e3a\u4e00\u4e2a\u76f8\u5f53\u5f3a\u5927\u7684\u7248\u672c\u63a7\u5236\u5de5\u5177\uff0cgitlab\u53ef\u4ee5\u8ba9\u56e2\u961f\u66f4\u65b9\u4fbf\u5730\u534f\u4f5c\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u4e86\u89e3\u5982\u4f55\u4f7f\u7528centos 7\u6765\u5b89\u88c5\u4ee5\u53ca\u914d\u7f6egitlab\u670d\u52a1\u5668\u3002<\/p>\n<p>\u6b65\u9aa4 1\uff1a\u66f4\u65b0\u5305\u7ba1\u7406\u5668<\/p>\n<p>\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u60a8\u7684\u670d\u52a1\u5668\u5df2\u7ecf\u66f4\u65b0\u4e86\u5305\u7ba1\u7406\u5668\u3002\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>sudo yum update -y<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6b65\u9aa4 2\uff1a\u5b89\u88c5\u4f9d\u8d56\u9879<\/p>\n<p>GitLab\u4f9d\u8d56\u4e8e\u8bb8\u591a\u8f6f\u4ef6\u5305\uff0c\u9700\u8981\u5728\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u3002\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u8fd9\u4e9b\u8f6f\u4ef6\u5305\uff1a<\/p>\n<pre>sudo yum install curl policycoreutils openssh-server openssh-clients -y\nsudo systemctl enable sshd\nsudo systemctl start sshd\nsudo firewall-cmd --permanent --add-service=http\nsudo systemctl reload firewalld<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6b65\u9aa4 3\uff1a\u8bbe\u7f6e\u5b89\u88c5\u6e90<\/p>\n<p>\u5b89\u88c5\u5e76\u914d\u7f6eGitLab\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5c06\u5b58\u50a8\u5e93\u6dfb\u52a0\u5230\u7cfb\u7edf\u4e2d\u3002\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5e76\u8fd4\u56de\u6b63\u786e\u7684RPM\u4ee3\u7801:<\/p>\n<pre>sudo 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>\u6b65\u9aa4 4\uff1a\u5b89\u88c5GitLab<\/p>\n<p>\u5f53\u60a8\u5df2\u7ecf\u914d\u7f6e\u4e86GitLab\u7684\u5b58\u50a8\u5e93\u5e76\u5b89\u88c5\u4e86\u4f9d\u8d56\u9879\u540e\uff0c\u90a3\u4e48\u5b83\u5c31\u53ef\u4ee5\u5b89\u88c5\u5230\u60a8\u7684CentOS 7\u7cfb\u7edf\u4e2d\u4e86\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5GitLab:<\/p>\n<pre>sudo yum install gitlab-ce -y<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6b64\u5b89\u88c5\u8fc7\u7a0b\u53ef\u80fd\u9700\u8981\u4e00\u4e9b\u65f6\u95f4\uff0c\u56e0\u6b64\u60a8\u9700\u8981\u8010\u5fc3\u7b49\u5f85\u3002<\/p>\n<p>\u6b65\u9aa4 5\uff1a\u914d\u7f6eGitLab<\/p>\n<p>\u5728\u5b89\u88c5GitLab\u540e\uff0c\u6211\u4eec\u5e94\u8be5\u914d\u7f6e\u5b83\u4ee5\u4f7f\u5176\u9002\u5408\u6211\u4eec\u7684\u9700\u6c42\u3002\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u542f\u52a8GitLab\u7684\u914d\u7f6e\u5411\u5bfc:<\/p>\n<pre>sudo gitlab-ctl reconfigure<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5728\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u91cd\u65b0\u542f\u52a8GitLab:<\/p>\n<pre>sudo gitlab-ctl restart<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u73b0\u5728\uff0c\u60a8\u5df2\u7ecf\u5b89\u88c5\u5e76\u914d\u7f6e\u4e86GitLab\uff01\u60a8\u53ef\u4ee5\u4f7f\u7528Web\u6d4f\u89c8\u5668\u8f93\u5165\u670d\u52a1\u5668IP\u5730\u5740\u6216URL\uff0c\u5e76\u4f7f\u7528\u7ba1\u7406\u5458\u5e10\u6237\u767b\u5f55\u3002<\/p>\n<p>\u7ed3\u8bba<\/p>\n<p>GitLab\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u7248\u672c\u63a7\u5236\u5de5\u5177\uff0c\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u65b9\u4fbf\u5730\u534f\u4f5c\u3002\u901a\u8fc7\u672c\u6587\uff0c\u6211\u4eec\u4e86\u89e3\u4e86\u5982\u4f55\u4f7f\u7528CentOS 7\u6765\u5b89\u88c5\u4ee5\u53ca\u914d\u7f6eGitLab\u670d\u52a1\u5668\u3002\u597d\u8fd0\uff01<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fcentos7\u600e\u4e48\u5b89\u88c5gitlab\u670d\u52a1\u5668\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>\u4f5c\u4e3a\u4e00\u4e2a\u76f8\u5f53\u5f3a\u5927\u7684\u7248\u672c\u63a7\u5236\u5de5\u5177\uff0cgitlab\u53ef\u4ee5\u8ba9\u56e2\u961f\u66f4\u65b9\u4fbf\u5730\u534f\u4f5c\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u4e86\u89e3\u5982\u4f55\u4f7f\u7528centos 7\u6765\u5b89\u88c5\u4ee5\u53ca\u914d\u7f6egitlab\u670d\u52a1\u5668\u3002 \u6b65\u9aa4 1\uff1a\u66f4\u65b0\u5305\u7ba1\u7406\u5668 \u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u60a8\u7684\u670d\u52a1\u5668\u5df2\u7ecf\u66f4\u65b0\u4e86\u5305\u7ba1\u7406\u5668\u3002\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a sudo yum update -y \u767b\u5f55\u540e\u590d\u5236 \u6b65\u9aa4 2\uff1a\u5b89\u88c5\u4f9d\u8d56\u9879 GitLab\u4f9d\u8d56\u4e8e\u8bb8\u591a\u8f6f\u4ef6\u5305\uff0c\u9700\u8981\u5728\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u3002\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u8fd9\u4e9b\u8f6f\u4ef6\u5305\uff1a sudo yum install curl policycoreutils openssh-server openssh-clients -y sudo systemctl enable sshd sudo systemctl start sshd sudo firewall-cmd &#8211;permanent &#8211;add-service=http sudo systemctl reload firewalld \u767b\u5f55\u540e\u590d\u5236 \u6b65\u9aa4 3\uff1a\u8bbe\u7f6e\u5b89\u88c5\u6e90 \u5b89\u88c5\u5e76\u914d\u7f6eGitLab\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5c06\u5b58\u50a8\u5e93\u6dfb\u52a0\u5230\u7cfb\u7edf\u4e2d\u3002\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5e76\u8fd4\u56de\u6b63\u786e\u7684RPM\u4ee3\u7801: sudo curl -sS https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ce\/script.rpm.sh | sudo bash \u767b\u5f55\u540e\u590d\u5236 \u6b65\u9aa4 4\uff1a\u5b89\u88c5GitLab \u5f53\u60a8\u5df2\u7ecf\u914d\u7f6e\u4e86GitLab\u7684\u5b58\u50a8\u5e93\u5e76\u5b89\u88c5\u4e86\u4f9d\u8d56\u9879\u540e\uff0c\u90a3\u4e48\u5b83\u5c31\u53ef\u4ee5\u5b89\u88c5\u5230\u60a8\u7684CentOS 7\u7cfb\u7edf\u4e2d\u4e86\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5GitLab: sudo yum [&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-19550","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19550","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=19550"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19550\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}