{"id":19028,"date":"2024-11-19T14:19:48","date_gmt":"2024-11-19T06:19:48","guid":{"rendered":"https:\/\/fwq.ai\/blog\/19028\/"},"modified":"2024-11-19T14:19:48","modified_gmt":"2024-11-19T06:19:48","slug":"windows%e6%80%8e%e4%b9%88%e5%ae%89%e8%a3%85gitlab","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/19028\/","title":{"rendered":"windows\u600e\u4e48\u5b89\u88c5gitlab"},"content":{"rendered":"<p>\u5728\u8f6f\u4ef6\u5f00\u53d1\u4e2d\uff0cgitlab \u662f\u4e00\u4e2a\u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf (vcs)\u3002\u5b83\u63d0\u4f9b\u4e86\u5404\u79cd\u5de5\u5177\u548c\u529f\u80fd\uff0c\u4ee5\u4fbf\u56e2\u961f\u534f\u4f5c\u548c\u4ee3\u7801\u7ba1\u7406\u5de5\u4f5c\u66f4\u52a0\u9ad8\u6548\u3002<\/p>\n<p>\u672c\u6587\u5c06\u91cd\u70b9\u4ecb\u7ecd Windows \u7cfb\u7edf\u4e0a GitLab \u7684\u5b89\u88c5\u8fc7\u7a0b\u3002<\/p>\n<p>\u4e00\u3001\u4e0b\u8f7d\u548c\u5b89\u88c5 Git<\/p>\n<p>\u5728\u4e0b\u8f7d\u548c\u5b89\u88c5 GitLab \u4e4b\u524d\uff0c\u60a8\u9700\u8981\u5148\u5b89\u88c5 Git\u3002GitLab \u9700\u8981\u5728\u7cfb\u7edf\u4e0a\u8fd0\u884c Git \u624d\u80fd\u4f7f\u7528\u3002<\/p>\n<ol>\n<li>\u8bbf\u95ee Git \u5b98\u7f51\uff08https:\/\/git-scm.com\/downloads\uff09\u5e76\u5b89\u88c5 Git\u3002<\/li>\n<li>\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u662f\u5426\u6dfb\u52a0 Git Bash\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u547d\u4ee4\u884c\u754c\u9762\uff0c\u65b9\u4fbf\u60a8\u5728 Windows \u7cfb\u7edf\u4e0a\u4f7f\u7528 Git\u3002<\/li>\n<li>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u8fd0\u884c Git Bash \u9a8c\u8bc1 Git \u662f\u5426\u5b89\u88c5\u6210\u529f\u3002\u5728 Git Bash \u4e2d\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/li>\n<\/ol>\n<pre>$ git --version<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5982\u679c Git \u7248\u672c\u53f7\u88ab\u663e\u793a\u51fa\u6765\uff0c\u90a3\u4e48 Git \u5b89\u88c5\u5b8c\u6210\u3002<\/p>\n<p>\u4e8c\u3001\u5b89\u88c5\u5e76\u914d\u7f6e Ruby<\/p>\n<p>GitLab \u662f\u4f7f\u7528 Ruby \u8bed\u8a00\u7f16\u5199\u7684\uff0c\u56e0\u6b64\u5728\u5b89\u88c5 GitLab \u4e4b\u524d\uff0c\u60a8\u9700\u8981\u5148\u5b89\u88c5 Ruby \u5f00\u53d1\u73af\u5883\u3002<\/p>\n<ol>\n<li>\u8bbf\u95ee Ruby \u5b98\u7f51\uff08https:\/\/rubyinstaller.org\/downloads\/\uff09\u5e76\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u7684 Ruby\u3002<\/li>\n<li>\u5b89\u88c5 Ruby\u3002\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u662f\u5426\u5c06 Ruby \u6dfb\u52a0\u5230 Windows PATH \u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u8f7b\u677e\u5730\u4f7f\u7528 Ruby\u3002<\/li>\n<li>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u9a8c\u8bc1 Ruby \u662f\u5426\u5b89\u88c5\u6210\u529f\uff1a<\/li>\n<\/ol>\n<pre>$ ruby -v<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6210\u529f\u5b89\u88c5\u540e\uff0c\u547d\u4ee4\u884c\u4f1a\u663e\u793a Ruby \u7248\u672c\u53f7\u3002<\/p>\n<p>\u4e09\u3001\u5b89\u88c5\u5e76\u914d\u7f6e PostgreSQL<\/p>\n<p>GitLab \u4f7f\u7528 PostgreSQL \u6570\u636e\u5e93\u6765\u5b58\u50a8\u6570\u636e\u3002\u56e0\u6b64\uff0c\u5728\u5b89\u88c5 GitLab \u4e4b\u524d\uff0c\u60a8\u9700\u8981\u5148\u5b89\u88c5\u548c\u914d\u7f6e PostgreSQL\u3002<\/p>\n<ol>\n<li>\u8bbf\u95ee PostgreSQL \u5b98\u7f51\uff08https:\/\/www.postgresql.org\/download\/windows\/\uff09\u5e76\u4e0b\u8f7d Windows \u7248\u672c\u7684 PostgreSQL\u3002<\/li>\n<li>\u5b89\u88c5 PostgreSQL\u3002\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u60a8\u9700\u8981\u8bbe\u7f6e\u4e00\u4e2a PostgreSQL \u7684\u7ba1\u7406\u5458\u5bc6\u7801\uff0c\u8fd9\u662f\u60a8\u5728\u4f7f\u7528 GitLab \u9875\u9762\u65f6\u9700\u8981\u8f93\u5165\u7684\u3002<\/li>\n<li>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u6d4b\u8bd5 PostgreSQL \u662f\u5426\u5b89\u88c5\u6210\u529f\uff1a<\/li>\n<\/ol>\n<pre>$ psql -U postgres<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5982\u679c\u547d\u4ee4\u884c\u88ab\u4fee\u6539\u4ee5\u663e\u793a PostgreSQL \u7684\u7248\u672c\u53f7\uff0c\u5219\u8bf4\u660e PostgreSQL \u5b89\u88c5\u6210\u529f\u3002<\/p>\n<ol>\n<li>\u5728 GitLab \u5b89\u88c5\u4e4b\u524d\uff0c\u60a8\u8fd8\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 PostgreSQL \u7528\u6237\u548c\u6570\u636e\u5e93\uff1a<\/li>\n<\/ol>\n<pre>$ createuser -P gitlab\n$ createdb -O gitlab gitlabhq_production<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u56db\u3001\u5b89\u88c5 GitLab<\/p>\n<p>\u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u4e0b\u8f7d\u5e76\u5b89\u88c5 GitLab \u4e86\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u901a\u8fc7 Omnibus \u5b89\u88c5 GitLab \u7684\u65b9\u5f0f\u3002<\/p>\n<ol>\n<li>\u8bbf\u95ee GitLab \u4f01\u4e1a\u7248\u7684\u5b98\u7f51\uff08https:\/\/about.gitlab.com\/install\/\uff09\u5e76\u4e0b\u8f7d Windows \u7248\u672c\u7684 GitLab Omnibus\u3002<\/li>\n<li>\u6253\u5f00 GitLab \u5b89\u88c5\u7a0b\u5e8f\u5e76\u6309\u7167\u63d0\u793a\u8fdb\u884c\u5b89\u88c5\u3002\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u60a8\u5c06\u88ab\u8981\u6c42\u8bbe\u7f6e GitLab \u7684\u7ba1\u7406\u5458\u8d26\u6237\u548c\u5bc6\u7801\uff0c\u4ee5\u53ca PostgreSQL \u6570\u636e\u5e93\u8fde\u63a5\u7684\u7528\u6237\u540d\u3001\u5bc6\u7801\u548c\u6570\u636e\u5e93\u540d\u79f0\u3002<\/li>\n<li>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u542f\u52a8 GitLab \u670d\u52a1\u3002\u5728 Git Bash \u4e2d\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/li>\n<\/ol>\n<pre>$ gitlab-ctl start<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u5728\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee GitLab \u4e86\u3002\u5728\u5730\u5740\u680f\u8f93\u5165 http:\/\/localhost\uff1a8080\uff0c\u60a8\u5c06\u770b\u5230 GitLab \u7684\u767b\u5f55\u9875\u9762\u3002\u8f93\u5165\u60a8\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u521b\u5efa\u7684\u7ba1\u7406\u5458\u8d26\u53f7\u548c\u5bc6\u7801\uff0c\u5373\u53ef\u767b\u5f55\u5e76\u5f00\u59cb\u4f7f\u7528 GitLab\u3002<\/li>\n<\/ol>\n<p>\u603b\u7ed3<\/p>\n<p>\u5728 Windows \u7cfb\u7edf\u4e0a\u5b89\u88c5 GitLab \u53ef\u4ee5\u5e2e\u52a9\u60a8\u66f4\u9ad8\u6548\u5730\u8fdb\u884c\u4ee3\u7801\u7ba1\u7406\u548c\u56e2\u961f\u534f\u4f5c\u3002\u901a\u8fc7\u7b80\u5355\u7684\u4e0b\u8f7d\u548c\u5b89\u88c5 Git\u3001Ruby \u548c PostgreSQL \u5e76\u5b89\u88c5 GitLab\uff0c\u60a8\u53ef\u4ee5\u5f00\u59cb\u4f7f\u7528 GitLab \u5e76\u4eab\u53d7\u5176\u529f\u80fd\u548c\u5de5\u5177\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fwindows\u600e\u4e48\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>\u5728\u8f6f\u4ef6\u5f00\u53d1\u4e2d\uff0cgitlab \u662f\u4e00\u4e2a\u5206\u5e03\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7edf (vcs)\u3002\u5b83\u63d0\u4f9b\u4e86\u5404\u79cd\u5de5\u5177\u548c\u529f\u80fd\uff0c\u4ee5\u4fbf\u56e2\u961f\u534f\u4f5c\u548c\u4ee3\u7801\u7ba1\u7406\u5de5\u4f5c\u66f4\u52a0\u9ad8\u6548\u3002 \u672c\u6587\u5c06\u91cd\u70b9\u4ecb\u7ecd Windows \u7cfb\u7edf\u4e0a GitLab \u7684\u5b89\u88c5\u8fc7\u7a0b\u3002 \u4e00\u3001\u4e0b\u8f7d\u548c\u5b89\u88c5 Git \u5728\u4e0b\u8f7d\u548c\u5b89\u88c5 GitLab \u4e4b\u524d\uff0c\u60a8\u9700\u8981\u5148\u5b89\u88c5 Git\u3002GitLab \u9700\u8981\u5728\u7cfb\u7edf\u4e0a\u8fd0\u884c Git \u624d\u80fd\u4f7f\u7528\u3002 \u8bbf\u95ee Git \u5b98\u7f51\uff08https:\/\/git-scm.com\/downloads\uff09\u5e76\u5b89\u88c5 Git\u3002 \u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u662f\u5426\u6dfb\u52a0 Git Bash\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u547d\u4ee4\u884c\u754c\u9762\uff0c\u65b9\u4fbf\u60a8\u5728 Windows \u7cfb\u7edf\u4e0a\u4f7f\u7528 Git\u3002 \u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u8fd0\u884c Git Bash \u9a8c\u8bc1 Git \u662f\u5426\u5b89\u88c5\u6210\u529f\u3002\u5728 Git Bash \u4e2d\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a $ git &#8211;version \u767b\u5f55\u540e\u590d\u5236 \u5982\u679c Git \u7248\u672c\u53f7\u88ab\u663e\u793a\u51fa\u6765\uff0c\u90a3\u4e48 Git \u5b89\u88c5\u5b8c\u6210\u3002 \u4e8c\u3001\u5b89\u88c5\u5e76\u914d\u7f6e Ruby GitLab \u662f\u4f7f\u7528 Ruby \u8bed\u8a00\u7f16\u5199\u7684\uff0c\u56e0\u6b64\u5728\u5b89\u88c5 GitLab \u4e4b\u524d\uff0c\u60a8\u9700\u8981\u5148\u5b89\u88c5 Ruby \u5f00\u53d1\u73af\u5883\u3002 [&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-19028","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19028","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=19028"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/19028\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=19028"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=19028"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=19028"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}