{"id":19050,"date":"2024-11-19T17:59:22","date_gmt":"2024-11-19T09:59:22","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19050\/"},"modified":"2024-11-19T17:59:22","modified_gmt":"2024-11-19T09:59:22","slug":"%e8%81%8a%e8%81%8a%e5%a6%82%e4%bd%95%e5%9c%a8centos-6-5%e4%b8%8a%e5%ae%89%e8%a3%85gitlab","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19050\/","title":{"rendered":"\u804a\u804a\u5982\u4f55\u5728CentOS 6.5\u4e0a\u5b89\u88c5GitLab"},"content":{"rendered":"<p>centos 6.5 gitlab \u5b89\u88c5<\/p>\n<p>GitLab \u662f\u4e00\u6b3e\u6d41\u884c\u7684\u57fa\u4e8e Git \u7684\u4ee3\u7801\u6258\u7ba1\u548c\u9879\u76ee\u7ba1\u7406\u5de5\u5177\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u5728\u56e2\u961f\u4e2d\u534f\u4f5c\u5f00\u53d1\u53ca\u7ba1\u7406\u4ee3\u7801\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728 CentOS 6.5 \u4e0a\u5b89\u88c5 GitLab\u3002<\/p>\n<p>\u6b65\u9aa4\u4e00\uff1a\u5b89\u88c5\u5fc5\u8981\u7684\u8f6f\u4ef6<\/p>\n<p>\u5728\u5b89\u88c5 GitLab \u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5148\u5b89\u88c5\u4e00\u4e9b\u5fc5\u8981\u7684\u8f6f\u4ef6\u5305\uff1a<\/p>\n<pre>sudo yum update\nsudo yum install curl openssh-server postfix cronie\nsudo service postfix start\nsudo chkconfig postfix on<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4e0a\u8ff0\u547d\u4ee4\u5c06\u66f4\u65b0\u60a8\u7684\u670d\u52a1\u5668\uff0c\u5e76\u5b89\u88c5\u6240\u9700\u7684\u8f6f\u4ef6\u5305\u3002 \u5728\u6b64\u8fc7\u7a0b\u4e2d\uff0c\u60a8\u9700\u8981\u6309 Y \u5f00\u59cb\u4e0b\u8f7d\u5e76\u5b89\u88c5\u8f6f\u4ef6\u5305\u3002<\/p>\n<p>\u6b65\u9aa4\u4e8c\uff1a\u5b89\u88c5 GitLab<\/p>\n<p>\u5b8c\u6210\u6b65\u9aa4\u4e00\u540e\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5 GitLab\u3002<\/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>\u4e0a\u8ff0\u547d\u4ee4\u5c06\u5b89\u88c5 GitLab \u7684\u6700\u65b0\u7248\u672c\u3002<\/p>\n<p>\u6b65\u9aa4\u4e09\uff1a\u8bbe\u7f6e GitLab<\/p>\n<p>\u901a\u8fc7\u4e0a\u8ff0\u547d\u4ee4\u5b89\u88c5 GitLab \u540e\uff0c\u4f1a\u6709\u4e00\u4e9b\u914d\u7f6e\u9700\u8981\u8bbe\u7f6e\u3002\u53ef\u4ee5\u6309\u7167\u4e0b\u8ff0\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n<ol>\n<li>\u786e\u8ba4\u4e3b\u673a\u540d\u548c IP \u5730\u5740<\/li>\n<\/ol>\n<p>\u5728\u8bbe\u7f6e GitLab \u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u60a8\u7684\u4e3b\u673a\u540d\u4e0e\u670d\u52a1\u5668 IP \u5730\u5740\u5339\u914d\u3002\u5f53\u60a8\u5b8c\u6210\u8bbe\u7f6e\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u67e5\u770b\u4e3b\u673a\u540d\u79f0\u548c IP \u5730\u5740\uff1a<\/p>\n<pre>hostname -f\nhostname -i<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u914d\u7f6e GitLab URL<\/li>\n<\/ol>\n<p>\u6253\u5f00 GitLab \u914d\u7f6e\u6587\u4ef6\u5e76\u6dfb\u52a0\u4ee5\u4e0b\u884c\uff1a<\/p>\n<pre>sudo vim \/etc\/gitlab\/gitlab.rb\n\nexternal_url 'http:\/\/your-server-hostname-or-IP'<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u542f\u52a8 GitLab \u5e76\u8bbe\u7f6e\u81ea\u52a8\u542f\u52a8<\/li>\n<\/ol>\n<pre>sudo gitlab-ctl reconfigure\nsudo gitlab-ctl start\nsudo chkconfig gitlab-runsvdir on<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4e0a\u8ff0\u547d\u4ee4\u5c06\u542f\u52a8 GitLab \u5e76\u8bbe\u7f6e\u4e3a\u59cb\u7ec8\u5728\u7cfb\u7edf\u542f\u52a8\u65f6\u81ea\u52a8\u542f\u52a8\u3002<\/p>\n<p>\u6b65\u9aa4\u56db\uff1a\u8bbf\u95ee GitLab<\/p>\n<p>\u73b0\u5728\uff0cGitLab \u5df2\u7ecf\u5b89\u88c5\u5e76\u505a\u597d\u4e86\u914d\u7f6e\uff0c\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee\u5b83\u3002\u53ea\u9700\u952e\u5165\u4ee5\u4e0b URL \u5373\u53ef\uff1a<\/p>\n<p>http:\/\/your-server-hostname-or-IP<\/p>\n<p>\u6ce8\u610f\uff1a \u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cGitLab \u662f\u901a\u8fc7 https:\/\/ \u534f\u8bae\u8fd0\u884c\u7684\u3002 \u5982\u679c\u9700\u8981\u4f7f\u7528 https\uff0c\u53ef\u4ee5\u5728\u5916\u90e8 URL \u4e0a\u52a0\u4e0a https \u524d\u7f00\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<p>https:\/\/your-server-hostname-or-IP<\/p>\n<p>\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662f\u9632\u706b\u5899\uff0c\u8bf7\u5141\u8bb8\u53e6\u4e00\u4e2a\u7aef\u53e3\u901a\u8fc7\uff1a<\/p>\n<pre>sudo iptables -I INPUT -p tcp --dport 8084 -j ACCEPT\nsudo service iptables save<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165\u60a8\u670d\u52a1\u5668\u7684 IP \u5730\u5740\u6216\u4e3b\u673a\u540d\uff0c\u5e76\u8bbf\u95ee GitLab\u3002 \u60a8\u5e94\u8be5\u4f1a\u770b\u5230\u4e00\u4e2a\u6b22\u8fce\u9875\u9762\u3002\u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 GitLab \u5e10\u6237\u6216\u4f7f\u7528\u60a8\u7684\u73b0\u6709\u5e10\u6237\u767b\u9646\u5230 GitLab\uff0c\u8fdb\u884c\u4ee3\u7801\u6258\u7ba1\u548c\u9879\u76ee\u7ba1\u7406\u3002<\/p>\n<p>\u7ed3\u8bba<\/p>\n<p>\u8fd9\u662f\u5728 CentOS 6.5 \u4e0a\u5b89\u88c5 GitLab \u7684\u5b8c\u6574\u8fc7\u7a0b\u3002\u901a\u8fc7\u9075\u5faa\u4e0a\u8ff0\u6307\u5357\uff0c\u60a8\u5e94\u8be5\u80fd\u591f\u8f7b\u677e\u5730\u5728 CentOS 6.5 \u670d\u52a1\u5668\u4e0a\u521b\u5efa\u81ea\u5df1\u7684 GitLab \u670d\u52a1\u5668\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u804a\u804a\u5982\u4f55\u5728CentOS 6.5\u4e0a\u5b89\u88c5GitLab\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>centos 6.5 gitlab \u5b89\u88c5 GitLab \u662f\u4e00\u6b3e\u6d41\u884c\u7684\u57fa\u4e8e Git \u7684\u4ee3\u7801\u6258\u7ba1\u548c\u9879\u76ee\u7ba1\u7406\u5de5\u5177\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u5728\u56e2\u961f\u4e2d\u534f\u4f5c\u5f00\u53d1\u53ca\u7ba1\u7406\u4ee3\u7801\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728 CentOS 6.5 \u4e0a\u5b89\u88c5 GitLab\u3002 \u6b65\u9aa4\u4e00\uff1a\u5b89\u88c5\u5fc5\u8981\u7684\u8f6f\u4ef6 \u5728\u5b89\u88c5 GitLab \u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5148\u5b89\u88c5\u4e00\u4e9b\u5fc5\u8981\u7684\u8f6f\u4ef6\u5305\uff1a sudo yum update sudo yum install curl openssh-server postfix cronie sudo service postfix start sudo chkconfig postfix on \u767b\u5f55\u540e\u590d\u5236 \u4e0a\u8ff0\u547d\u4ee4\u5c06\u66f4\u65b0\u60a8\u7684\u670d\u52a1\u5668\uff0c\u5e76\u5b89\u88c5\u6240\u9700\u7684\u8f6f\u4ef6\u5305\u3002 \u5728\u6b64\u8fc7\u7a0b\u4e2d\uff0c\u60a8\u9700\u8981\u6309 Y \u5f00\u59cb\u4e0b\u8f7d\u5e76\u5b89\u88c5\u8f6f\u4ef6\u5305\u3002 \u6b65\u9aa4\u4e8c\uff1a\u5b89\u88c5 GitLab \u5b8c\u6210\u6b65\u9aa4\u4e00\u540e\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5 GitLab\u3002 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 \u4e0a\u8ff0\u547d\u4ee4\u5c06\u5b89\u88c5 [&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-19050","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19050","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=19050"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19050\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19050"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19050"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}