{"id":19053,"date":"2024-11-19T11:48:48","date_gmt":"2024-11-19T03:48:48","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19053\/"},"modified":"2024-11-19T11:48:48","modified_gmt":"2024-11-19T03:48:48","slug":"%e5%ae%9e%e4%be%8b%e4%bb%8b%e7%bb%8dlinux%e7%b3%bb%e7%bb%9f%e4%b8%8b%e5%a6%82%e4%bd%95%e6%90%ad%e5%bb%bagitlab%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19053\/","title":{"rendered":"\u5b9e\u4f8b\u4ecb\u7ecdLinux\u7cfb\u7edf\u4e0b\u5982\u4f55\u642d\u5efaGitLab\uff1f"},"content":{"rendered":"<p>linux\u4e0b\u5982\u4f55\u642d\u5efagitlab\uff1fubuntu 18.04\u4e3a\u4f8b\u8fdb\u884c\u8be6\u7ec6\u4ecb\u7ecd\u3002<\/p>\n<ol>\n<li>\u5b89\u88c5\u5fc5\u8981\u7684\u8f6f\u4ef6\u5305<\/li>\n<\/ol>\n<p>\u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5\u4ee5\u4e0b\u8f6f\u4ef6\u5305\uff1a<\/p>\n<pre>sudo apt update\nsudo apt install -y curl openssh-server ca-certificates tzdata perl<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u5b89\u88c5PostgreSQL<\/li>\n<\/ol>\n<p>GitLab\u7684\u6570\u636e\u5e93\u9700\u8981\u4f7f\u7528\u5230PostgreSQL\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\uff1a<\/p>\n<pre>sudo apt install -y postgresql postgresql-client libpq-dev<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u5b89\u88c5GitLab<\/li>\n<\/ol>\n<p>\u5b89\u88c5GitLab\u9700\u8981\u6dfb\u52a0\u5b98\u65b9\u7684\u5305\u6e90\u5e76\u5b89\u88c5\uff1a<\/p>\n<pre>curl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ee\/script.deb.sh | sudo bash\nsudo apt install gitlab-ee<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u914d\u7f6eGitLab<\/li>\n<\/ol>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9700\u8981\u8fdb\u884c\u521d\u59cb\u5316\u8bbe\u7f6e\u3002\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539\/etc\/gitlab\/gitlab.rb\u6587\u4ef6\u8fdb\u884c\u914d\u7f6e\uff0c\u6bd4\u5982\u4fee\u6539GitLab\u7684\u8bbf\u95eeURL\u3001\u7aef\u53e3\u53f7\u7b49\u7b49\u3002\u4fee\u6539\u5b8c\u6210\u540e\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u4f7f\u914d\u7f6e\u751f\u6548\uff1a<\/p>\n<pre>sudo gitlab-ctl reconfigure<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u91cd\u542fGitLab<\/li>\n<\/ol>\n<p>\u5982\u679c\u6709\u4fee\u6539\u4e86\u914d\u7f6e\u6587\u4ef6\uff0c\u9700\u8981\u91cd\u542fGitLab\u624d\u80fd\u751f\u6548\uff1a<\/p>\n<pre>sudo gitlab-ctl restart<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u4f7f\u7528GitLab<\/li>\n<\/ol>\n<p>\u5b89\u88c5\u5e76\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95eeGitLab\u7684URL\u8fdb\u884c\u4f7f\u7528\u3002<br \/>\u9996\u6b21\u767b\u5f55GitLab\u4f1a\u8981\u6c42\u8bbe\u7f6e\u7ba1\u7406\u5458\u5bc6\u7801\uff0c\u8bbe\u7f6e\u5b8c\u6210\u540e\u4f1a\u8fdb\u5165GitLab\u7684\u9996\u9875\uff0c\u5373\u53ef\u5f00\u59cb\u4f7f\u7528\u3002<br \/>\u9664\u4e86\u57fa\u672c\u7684\u4ee3\u7801\u7ba1\u7406\u5916\uff0cGitLab\u8fd8\u63d0\u4f9b\u4e86Issues\u3001Wiki\u3001Merge Request\u7b49\u529f\u80fd\u6765\u63d0\u9ad8\u56e2\u961f\u534f\u4f5c\u7684\u6548\u7387\u3002<\/p>\n<p>\u603b\u7ed3<\/p>\n<p>\u642d\u5efaGitLab\u4e0d\u662f\u5f88\u56f0\u96be\uff0c\u6309\u7167\u4e0a\u9762\u7684\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\u5373\u53ef\u3002\u4e0d\u8fc7\uff0c\u5b9e\u9645\u64cd\u4f5c\u4e2d\u53ef\u80fd\u8fd8\u4f1a\u9047\u5230\u4e9b\u95ee\u9898\uff0c\u53ef\u4ee5\u53c2\u8003\u5b98\u65b9\u6587\u6863\u8fdb\u884c\u6392\u67e5\u3002\u4f7f\u7528GitLab\u53ef\u4ee5\u63d0\u9ad8\u56e2\u961f\u534f\u4f5c\u6548\u7387\uff0c\u540c\u65f6\u4e5f\u53ef\u4ee5\u66f4\u597d\u5730\u7ba1\u7406\u4ee3\u7801\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5b9e\u4f8b\u4ecb\u7ecdLinux\u7cfb\u7edf\u4e0b\u5982\u4f55\u642d\u5efaGitLab\uff1f\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>linux\u4e0b\u5982\u4f55\u642d\u5efagitlab\uff1fubuntu 18.04\u4e3a\u4f8b\u8fdb\u884c\u8be6\u7ec6\u4ecb\u7ecd\u3002 \u5b89\u88c5\u5fc5\u8981\u7684\u8f6f\u4ef6\u5305 \u9996\u5148\uff0c\u9700\u8981\u5b89\u88c5\u4ee5\u4e0b\u8f6f\u4ef6\u5305\uff1a sudo apt update sudo apt install -y curl openssh-server ca-certificates tzdata perl \u767b\u5f55\u540e\u590d\u5236 \u5b89\u88c5PostgreSQL GitLab\u7684\u6570\u636e\u5e93\u9700\u8981\u4f7f\u7528\u5230PostgreSQL\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\uff1a sudo apt install -y postgresql postgresql-client libpq-dev \u767b\u5f55\u540e\u590d\u5236 \u5b89\u88c5GitLab \u5b89\u88c5GitLab\u9700\u8981\u6dfb\u52a0\u5b98\u65b9\u7684\u5305\u6e90\u5e76\u5b89\u88c5\uff1a curl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ee\/script.deb.sh | sudo bash sudo apt install gitlab-ee \u767b\u5f55\u540e\u590d\u5236 \u914d\u7f6eGitLab \u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9700\u8981\u8fdb\u884c\u521d\u59cb\u5316\u8bbe\u7f6e\u3002\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539\/etc\/gitlab\/gitlab.rb\u6587\u4ef6\u8fdb\u884c\u914d\u7f6e\uff0c\u6bd4\u5982\u4fee\u6539GitLab\u7684\u8bbf\u95eeURL\u3001\u7aef\u53e3\u53f7\u7b49\u7b49\u3002\u4fee\u6539\u5b8c\u6210\u540e\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u4f7f\u914d\u7f6e\u751f\u6548\uff1a sudo gitlab-ctl reconfigure \u767b\u5f55\u540e\u590d\u5236 \u91cd\u542fGitLab \u5982\u679c\u6709\u4fee\u6539\u4e86\u914d\u7f6e\u6587\u4ef6\uff0c\u9700\u8981\u91cd\u542fGitLab\u624d\u80fd\u751f\u6548\uff1a sudo gitlab-ctl restart \u767b\u5f55\u540e\u590d\u5236 \u4f7f\u7528GitLab \u5b89\u88c5\u5e76\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u8bbf\u95eeGitLab\u7684URL\u8fdb\u884c\u4f7f\u7528\u3002\u9996\u6b21\u767b\u5f55GitLab\u4f1a\u8981\u6c42\u8bbe\u7f6e\u7ba1\u7406\u5458\u5bc6\u7801\uff0c\u8bbe\u7f6e\u5b8c\u6210\u540e\u4f1a\u8fdb\u5165GitLab\u7684\u9996\u9875\uff0c\u5373\u53ef\u5f00\u59cb\u4f7f\u7528\u3002\u9664\u4e86\u57fa\u672c\u7684\u4ee3\u7801\u7ba1\u7406\u5916\uff0cGitLab\u8fd8\u63d0\u4f9b\u4e86Issues\u3001Wiki\u3001Merge Request\u7b49\u529f\u80fd\u6765\u63d0\u9ad8\u56e2\u961f\u534f\u4f5c\u7684\u6548\u7387\u3002 \u603b\u7ed3 [&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-19053","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19053","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=19053"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19053\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19053"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}