{"id":19037,"date":"2024-11-19T10:06:54","date_gmt":"2024-11-19T02:06:54","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19037\/"},"modified":"2024-11-19T10:06:54","modified_gmt":"2024-11-19T02:06:54","slug":"%e5%85%b3%e4%ba%8egitlab-7%e7%9a%84%e5%ae%89%e8%a3%85%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19037\/","title":{"rendered":"\u5173\u4e8eGitLab 7\u7684\u5b89\u88c5\u6559\u7a0b"},"content":{"rendered":"<p>\u5728\u8f6f\u4ef6\u5f00\u53d1\u4e2d\uff0c\u4e00\u6b3e\u597d\u7528\u7684\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u662f\u975e\u5e38\u91cd\u8981\u7684\u4e00\u4e2a\u73af\u8282\u3002gitlab \u662f\u4e00\u6b3e\u57fa\u4e8egit\u7684\u4ee3\u7801\u7ba1\u7406\u5de5\u5177\uff0c\u5b83\u80fd\u591f\u63d0\u4f9b\u4e00\u6574\u5957\u7684\u5b9e\u73b0\u4ee3\u7801\u7ba1\u7406\u3001\u6301\u7eed\u96c6\u6210\u53ca\u90e8\u7f72\u7684\u89e3\u51b3\u65b9\u6848\u3002\u4e0b\u9762\u6211\u4eec\u5c31\u6765\u8bb2\u89e3\u4e00\u4e0b\u5173\u4e8egitlab 7\u7684\u5b89\u88c5\u6559\u7a0b\u3002<\/p>\n<ol>\n<li>\u5b89\u88c5\u5fc5\u5907\u7ec4\u4ef6<br \/>\u5728\u5f00\u59cb\u5b89\u88c5GitLab\u524d\uff0c\u9700\u8981\u5148\u5b89\u88c5\u6240\u9700\u8981\u7684\u7ec4\u4ef6\u548c\u4f9d\u8d56\u9879\u3002\u4ee5\u4e0b\u7ec4\u4ef6\u662f\u5b89\u88c5GitLab\u5fc5\u8981\u7684\uff1a<\/li>\n<\/ol>\n<ul>\n<li>CURL<\/li>\n<li>Git<\/li>\n<li>PostgreSQL<\/li>\n<li>Python<\/li>\n<li>Redis<\/li>\n<li>GCC<\/li>\n<li>Make<\/li>\n<li>OpenSSL<\/li>\n<\/ul>\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u7ec4\u4ef6\u5b89\u88c5\uff1a<\/p>\n<p>sudo apt-get update<br \/>sudo apt-get install -y curl git libpq-dev python-dev redis-server build-essential openssl<\/p>\n<ol>\n<li>\u5b89\u88c5GitLab<br \/>\u5728\u5b89\u88c5GitLab\u4e4b\u524d\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u5b89\u88c5GitLab\u4f9d\u8d56\u7684\u4f9d\u8d56\u9879\uff1a<\/li>\n<\/ol>\n<p>sudo apt-get install -y postfix<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5f00\u59cb\u5b89\u88c5GitLab\u3002 \u9996\u5148\u8981\u5c06GitLab\u5b98\u7f51\u7684\u955c\u50cf\u66f4\u65b0\u5230\u672c\u5730\u73af\u5883\u4e2d\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6dfb\u52a0GitLab\u5b98\u7f51\u7684Aptitude\u6e90\u5217\u8868\uff1a<\/p>\n<p>curl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ee\/script.deb.sh | sudo bash<\/p>\n<p>\u6ce8\u610f\uff1a\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662fGitLab CE\uff0c \u5e94\u5c06\u4e0a\u9762\u7684\u811a\u672c\u4e2d\u7684 \u201cgitlab-ee\u201d \u6539\u6210 \u201cgitlab-ce\u201d\u5373\u53ef\u3002<\/p>\n<p>\u7136\u540e\u5f00\u59cb\u5177\u4f53\u7684\u5b89\u88c5\u8fc7\u7a0b\uff1a<\/p>\n<p>sudo apt-get install gitlab-ee<\/p>\n<p>\u5728\u5b89\u88c5\u671f\u95f4\uff0c\u60a8\u9700\u8981\u8fdb\u884c\u76f8\u5173\u7684\u8bbe\u7f6e\uff0c\u5982GitLab\u7684\u57df\u540d\uff0c\u7ba1\u7406\u5458\u8d26\u6237\u7b49\uff0c\u6309\u7167\u63d0\u793a\u5b8c\u6210\u5b89\u88c5\u5373\u53ef\u3002<\/p>\n<ol>\n<li>\u914d\u7f6eGitLab<br \/>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9700\u8981\u8fdb\u884c\u76f8\u5173\u7684\u57fa\u672c\u914d\u7f6e\uff0c\u5305\u62ec\u4fee\u6539PostgreSQL\u548cRedis\u7684\u8bbe\u7f6e\u3002\u6b64\u5916\uff0c\u60a8\u8fd8\u9700\u8981\u4e3aGitLab\u521b\u5efa\u914d\u7f6e\u6587\u4ef6\u3002<\/li>\n<\/ol>\n<p>\u7f16\u8f91\/etc\/gitlab\/gitlab.rb\u6587\u4ef6<\/p>\n<p>sudo nano \/etc\/gitlab\/gitlab.rb<\/p>\n<p>\u4fee\u6539\u6211\u4eec\u9700\u8981\u7684\u8bbe\u7f6e<\/p>\n<p>\u4e3b\u8981\u8bbe\u7f6e\uff1a<\/p>\n<ul>\n<li>external_url \u2018http:\/\/gitlab.example.com\u2019<\/li>\n<\/ul>\n<p>GitLab\u8bbf\u95ee\u7684URL\u5730\u5740\u3002<\/p>\n<ul>\n<li>gitlab_rails[\u2018gitlab_email_from\u2019] = \u2018gitlab@example.com\u2019<\/li>\n<\/ul>\n<p>\u90ae\u4ef6\u53d1\u9001\u65f6\u4f7f\u7528\u7684\u53d1\u9001\u6e90\u3002<\/p>\n<ul>\n<li>gitlab_rails[\u2018gitlab_email_display_name\u2019] = \u2018GitLab\u2019<\/li>\n<\/ul>\n<p>\u90ae\u4ef6\u4e2d\u4f7f\u7528\u7684\u540d\u79f0\u3002<\/p>\n<ul>\n<li>gitlab_rails[\u2018ldap_enabled\u2019] = true<br \/>\u5f00\u542fLDAP\u670d\u52a1<\/li>\n<\/ul>\n<p>\u4fdd\u5b58\u5e76\u5173\u95ed\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<p>\u6267\u884creconfigure<\/p>\n<p>sudo gitlab-ctl reconfigure<\/p>\n<p>\u8fd9\u4e2a\u64cd\u4f5c\u5c06\u91cd\u65b0\u914d\u7f6eGitLab\uff0c\u4f7f\u7528\u4e4b\u524d\u66f4\u6539\u8fc7\u7684\u914d\u7f6e\u53c2\u6570\u3002<\/p>\n<p>\u81f3\u6b64\uff0c\u60a8\u5df2\u7ecf\u6210\u529f\u5b89\u88c5\u4e86GitLab 7\uff0c\u53ef\u4ee5\u5f00\u59cb\u5b9e\u73b0\u60a8\u7684\u9879\u76ee\u4ee3\u7801\u7ba1\u7406\u5566\uff01<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5173\u4e8eGitLab 7\u7684\u5b89\u88c5\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>\u5728\u8f6f\u4ef6\u5f00\u53d1\u4e2d\uff0c\u4e00\u6b3e\u597d\u7528\u7684\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u662f\u975e\u5e38\u91cd\u8981\u7684\u4e00\u4e2a\u73af\u8282\u3002gitlab \u662f\u4e00\u6b3e\u57fa\u4e8egit\u7684\u4ee3\u7801\u7ba1\u7406\u5de5\u5177\uff0c\u5b83\u80fd\u591f\u63d0\u4f9b\u4e00\u6574\u5957\u7684\u5b9e\u73b0\u4ee3\u7801\u7ba1\u7406\u3001\u6301\u7eed\u96c6\u6210\u53ca\u90e8\u7f72\u7684\u89e3\u51b3\u65b9\u6848\u3002\u4e0b\u9762\u6211\u4eec\u5c31\u6765\u8bb2\u89e3\u4e00\u4e0b\u5173\u4e8egitlab 7\u7684\u5b89\u88c5\u6559\u7a0b\u3002 \u5b89\u88c5\u5fc5\u5907\u7ec4\u4ef6\u5728\u5f00\u59cb\u5b89\u88c5GitLab\u524d\uff0c\u9700\u8981\u5148\u5b89\u88c5\u6240\u9700\u8981\u7684\u7ec4\u4ef6\u548c\u4f9d\u8d56\u9879\u3002\u4ee5\u4e0b\u7ec4\u4ef6\u662f\u5b89\u88c5GitLab\u5fc5\u8981\u7684\uff1a CURL Git PostgreSQL Python Redis GCC Make OpenSSL \u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u7ec4\u4ef6\u5b89\u88c5\uff1a sudo apt-get updatesudo apt-get install -y curl git libpq-dev python-dev redis-server build-essential openssl \u5b89\u88c5GitLab\u5728\u5b89\u88c5GitLab\u4e4b\u524d\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u5b89\u88c5GitLab\u4f9d\u8d56\u7684\u4f9d\u8d56\u9879\uff1a sudo apt-get install -y postfix \u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5f00\u59cb\u5b89\u88c5GitLab\u3002 \u9996\u5148\u8981\u5c06GitLab\u5b98\u7f51\u7684\u955c\u50cf\u66f4\u65b0\u5230\u672c\u5730\u73af\u5883\u4e2d\uff0c\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6dfb\u52a0GitLab\u5b98\u7f51\u7684Aptitude\u6e90\u5217\u8868\uff1a curl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ee\/script.deb.sh | sudo bash \u6ce8\u610f\uff1a\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662fGitLab CE\uff0c \u5e94\u5c06\u4e0a\u9762\u7684\u811a\u672c\u4e2d\u7684 \u201cgitlab-ee\u201d \u6539\u6210 \u201cgitlab-ce\u201d\u5373\u53ef\u3002 \u7136\u540e\u5f00\u59cb\u5177\u4f53\u7684\u5b89\u88c5\u8fc7\u7a0b\uff1a sudo apt-get install gitlab-ee \u5728\u5b89\u88c5\u671f\u95f4\uff0c\u60a8\u9700\u8981\u8fdb\u884c\u76f8\u5173\u7684\u8bbe\u7f6e\uff0c\u5982GitLab\u7684\u57df\u540d\uff0c\u7ba1\u7406\u5458\u8d26\u6237\u7b49\uff0c\u6309\u7167\u63d0\u793a\u5b8c\u6210\u5b89\u88c5\u5373\u53ef\u3002 \u914d\u7f6eGitLab\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9700\u8981\u8fdb\u884c\u76f8\u5173\u7684\u57fa\u672c\u914d\u7f6e\uff0c\u5305\u62ec\u4fee\u6539PostgreSQL\u548cRedis\u7684\u8bbe\u7f6e\u3002\u6b64\u5916\uff0c\u60a8\u8fd8\u9700\u8981\u4e3aGitLab\u521b\u5efa\u914d\u7f6e\u6587\u4ef6\u3002 \u7f16\u8f91\/etc\/gitlab\/gitlab.rb\u6587\u4ef6 sudo nano [&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-19037","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19037","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=19037"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19037\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19037"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19037"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19037"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}