{"id":19032,"date":"2024-11-19T08:52:55","date_gmt":"2024-11-19T00:52:55","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19032\/"},"modified":"2024-11-19T08:52:55","modified_gmt":"2024-11-19T00:52:55","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8centos-6-5%e7%b3%bb%e7%bb%9f%e4%b8%8a%e5%ae%89%e8%a3%85gitlab","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19032\/","title":{"rendered":"\u5982\u4f55\u5728CentOS 6.5\u7cfb\u7edf\u4e0a\u5b89\u88c5GitLab"},"content":{"rendered":"<p>\u8fd1\u5e74\u6765\uff0cgitlab\u4f5c\u4e3a\u4f01\u4e1a\u7ea7\u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\u5907\u53d7\u6b22\u8fce\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728centos 6.5\u7cfb\u7edf\u4e0a\u5b89\u88c5gitlab\u3002<\/p>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5c06\u7cfb\u7edf\u5347\u7ea7\u81f3\u6700\u65b0\u7248\u672c\uff1a<\/p>\n<pre>sudo yum update<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u63a5\u7740\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u4f9d\u8d56\u5305\uff1a<\/p>\n<pre>sudo yum install curl policycoreutils openssh-server openssh-clients \nsudo yum install postfix\nsudo service postfix start\nsudo chkconfig postfix on<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6ce8\u610f\uff1a\u8fd9\u91cc\u7684postfix\u662f\u90ae\u4ef6\u670d\u52a1\uff0c\u53ef\u4ee5\u4e0d\u5b89\u88c5\uff0c\u5982\u679c\u5df2\u7ecf\u5b89\u88c5\u5176\u4ed6\u90ae\u4ef6\u670d\u52a1\u53ef\u4ee5\u5ffd\u7565\u6b64\u6b65\u9aa4\u3002<\/p>\n<p>\u4e0b\u4e00\u6b65\u5c31\u662f\u5b89\u88c5GitLab\u5b98\u65b9\u63d0\u4f9b\u7684\u4ed3\u5e93\uff1a<\/p>\n<pre>sudo 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>\u5b89\u88c5GitLab\uff1a<\/p>\n<pre>sudo yum install gitlab-ee<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u9700\u8981\u914d\u7f6e\u4e00\u4e0bGitLab\u3002\u9996\u5148\u8981\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<pre>sudo vim \/etc\/gitlab\/gitlab.rb<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5c06&#8221;external_url&#8221;\u8bbe\u7f6e\u4e3a\u4f60\u7684\u57df\u540d\u6216\u8005IP\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>external_url 'http:\/\/gitlab.example.com'<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5982\u679c\u9700\u8981\u4fee\u6539\u6570\u636e\u5e93\u914d\u7f6e\uff0c\u53ef\u4ee5\u5728\u6b64\u6587\u4ef6\u4e2d\u8fdb\u884c\u4fee\u6539\u3002\u4fee\u6539\u5b8c\u6210\u540e\uff0c\u91cd\u542fGitLab\uff1a<\/p>\n<pre>sudo gitlab-ctl reconfigure<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5982\u679c\u6ca1\u610f\u5916\uff0cGitLab\u5e94\u8be5\u5df2\u7ecf\u6210\u529f\u8fd0\u884c\u4e86\u3002\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95ee\u4f60\u7684\u57df\u540d\u6216IP\u5730\u5740\u67e5\u770bGitLab\u662f\u5426\u6b63\u5e38\u8fd0\u884c\u3002\u9ed8\u8ba4\u7684\u7ba1\u7406\u5458\u8d26\u6237\u662f\u201croot\u201d\uff0c\u5bc6\u7801\u662f\u201c5iveL!fe\u201d\u3002<\/p>\n<p>\u5982\u679c\u9700\u8981\u6dfb\u52a0\u65b0\u7684\u7528\u6237\uff0c\u53ef\u4ee5\u4f7f\u7528\u7ba1\u7406\u5458\u8d26\u6237\u767b\u5f55\u540e\u5728Web\u9875\u9762\u4e2d\u6dfb\u52a0\u3002\u5982\u679c\u9700\u8981\u6dfb\u52a0\u65b0\u7684\u9879\u76ee\uff0c\u53ef\u4ee5\u5728Web\u9875\u9762\u4e2d\u521b\u5efa\u65b0\u7684\u9879\u76ee\u3002<\/p>\n<p>\u81f3\u6b64\uff0c\u6211\u4eec\u5df2\u7ecf\u6210\u529f\u5730\u5728CentOS 6.5\u7cfb\u7edf\u4e0a\u5b89\u88c5\u5e76\u914d\u7f6e\u597d\u4e86GitLab\u3002GitLab\u4f5c\u4e3a\u4e00\u4e2a\u96c6\u6210\u4e86\u7248\u672c\u63a7\u5236\u548c\u9879\u76ee\u7ba1\u7406\u7684\u5e73\u53f0\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u8fdb\u884c\u4ee3\u7801\u7ba1\u7406\u3001\u9879\u76ee\u7ba1\u7406\u548c\u534f\u4f5c\u5f00\u53d1\u7b49\u529f\u80fd\u3002\u5e0c\u671b\u672c\u6587\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5728CentOS 6.5\u7cfb\u7edf\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>\u8fd1\u5e74\u6765\uff0cgitlab\u4f5c\u4e3a\u4f01\u4e1a\u7ea7\u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\u5907\u53d7\u6b22\u8fce\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u5728centos 6.5\u7cfb\u7edf\u4e0a\u5b89\u88c5gitlab\u3002 \u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5c06\u7cfb\u7edf\u5347\u7ea7\u81f3\u6700\u65b0\u7248\u672c\uff1a sudo yum update \u767b\u5f55\u540e\u590d\u5236 \u63a5\u7740\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u4f9d\u8d56\u5305\uff1a sudo yum install curl policycoreutils openssh-server openssh-clients sudo yum install postfix sudo service postfix start sudo chkconfig postfix on \u767b\u5f55\u540e\u590d\u5236 \u6ce8\u610f\uff1a\u8fd9\u91cc\u7684postfix\u662f\u90ae\u4ef6\u670d\u52a1\uff0c\u53ef\u4ee5\u4e0d\u5b89\u88c5\uff0c\u5982\u679c\u5df2\u7ecf\u5b89\u88c5\u5176\u4ed6\u90ae\u4ef6\u670d\u52a1\u53ef\u4ee5\u5ffd\u7565\u6b64\u6b65\u9aa4\u3002 \u4e0b\u4e00\u6b65\u5c31\u662f\u5b89\u88c5GitLab\u5b98\u65b9\u63d0\u4f9b\u7684\u4ed3\u5e93\uff1a sudo curl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ee\/script.rpm.sh | sudo bash \u767b\u5f55\u540e\u590d\u5236 \u5b89\u88c5GitLab\uff1a sudo yum install gitlab-ee \u767b\u5f55\u540e\u590d\u5236 \u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u9700\u8981\u914d\u7f6e\u4e00\u4e0bGitLab\u3002\u9996\u5148\u8981\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\uff1a sudo vim \/etc\/gitlab\/gitlab.rb \u767b\u5f55\u540e\u590d\u5236 \u5c06&#8221;external_url&#8221;\u8bbe\u7f6e\u4e3a\u4f60\u7684\u57df\u540d\u6216\u8005IP\uff0c\u4f8b\u5982\uff1a external_url &#8216;http:\/\/gitlab.example.com&#8217; \u767b\u5f55\u540e\u590d\u5236 \u5982\u679c\u9700\u8981\u4fee\u6539\u6570\u636e\u5e93\u914d\u7f6e\uff0c\u53ef\u4ee5\u5728\u6b64\u6587\u4ef6\u4e2d\u8fdb\u884c\u4fee\u6539\u3002\u4fee\u6539\u5b8c\u6210\u540e\uff0c\u91cd\u542fGitLab\uff1a sudo gitlab-ctl [&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-19032","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19032","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=19032"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19032\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19032"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19032"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19032"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}