{"id":288,"date":"2021-01-05T17:48:46","date_gmt":"2021-01-05T17:48:46","guid":{"rendered":"http:\/\/robinluo.top\/?p=288"},"modified":"2021-01-05T18:18:23","modified_gmt":"2021-01-05T18:18:23","slug":"gitlab","status":"publish","type":"post","link":"https:\/\/robinluo.top\/?p=288","title":{"rendered":"gitlab"},"content":{"rendered":"\n<p>ubuntu\u4e0b\u5b89\u88c5gitlab \uff08\u5fc5\u987b\u662f64\u4f4d\u7cfb\u7edf\uff09<\/p>\n\n\n\n<p>gitlab \u662f\u4e00\u4e2a\u57fa\u4e8egit\u7684\u7248\u672c\u7ba1\u7406\u670d\u52a1\u5668 \u7531ruby\u7f16\u5199<\/p>\n\n\n\n<p>\u7136\u800cgitlab\u7684\u5e94\u7528\u4e2d\u6709\u5404\u79cd\u8fdb\u7a0b\u4f5c\u4e3a\u8f85\u52a9\u529f\u80fd nginx redis posgresSQL \u7b49\u4e00\u7cfb\u5217\u7684\u8f85\u52a9\u8fdb\u7a0b \u4e3a\u4e86\u907f\u514d\u548c\u672c\u7ea7\u51b2\u7a81\u5e94\u8be5\u8bbe\u7f6e\u5176enabled\u4e3afalse \u7136\u540e\u8c03\u7528\u672c\u673a\u7684\u7b2c\u4e09\u65b9\u5e94\u7528<\/p>\n\n\n\n<p>apt install gitlab-ce \u5b89\u88c5\u5b8c\u6210\u540e \u7f16\u5199 \/etc\/gitlab\/gitlab.rb (ruby\u6587\u4ef6) \u8fdb\u884c\u914d\u7f6e\uff0c\u6240\u6709\u914d\u7f6e\u90fd\u5e94\u8be5\u5728\u8fd9\u91cc\u5199 \u7136\u540e\u901a\u8fc7gitlab-ctl reconfigure \u90e8\u7f72\u5230\u5177\u4f53\u5e94\u7528\u4e0a \u4e0d\u5e94\u5728gitlab\u5177\u4f53\u7684\u5e94\u7528\u914d\u7f6e\u4e0a\u76f4\u63a5\u66f4\u6539  \u5982\u7f16\u5199gitlab\u81ea\u5e26\u7684nginx\u7684nginx.conf  redis \u7684 redis.conf \u7b49<\/p>\n\n\n\n<p>\u8fd0\u884c\u89e3\u6790 \u9996\u5148\u8fdb\u7a0b\u8dd1\u8d77\u5728puma\u4e2d\uff08\u65e7\u7248\u5728unicorn\uff09\u8dd1\u8d77http\u670d\u52a1\uff0c\u7136\u540e\u7531gitlab-workhorse \u4ee3\u7406 \u5c06http\u670d\u52a1\u8f6c\u79fb\u5230unix:socket\u4e2d\u3002\u7136\u540e\u901a\u8fc7\u6211\u4eec\u81ea\u5df1\u7684nginx \u628a\u8bf7\u6c42\u8f6c\u53d1\u5230 \u8fd9\u4e2asocket\u4e2d\u5373\u53ef<\/p>\n\n\n\n<p>\u90ae\u4ef6\u914d\u7f6e \uff1agitlab\u9700\u8981\u914d\u7f6e\u90ae\u4ef6\u53d1\u4ef6\u8d26\u53f7 \u6240\u4ee5\u5728smtp\u4e2d\u914d\u7f6e\u81ea\u5df1\u7684qq\u90ae\u7bb1 qq\u90ae\u7bb1\u9700\u5f00\u542fsmtp\u529f\u80fd \u914d\u914d\u7f6e\u6388\u6743\u7801<\/p>\n\n\n\n<p>gitlab\u547d\u4ee4 gitlab-ctl help\/configure\/restart\/start\/stop gitlab-rails console \u8fdb\u5165\u63a7\u5236\u53f0 \u53ef\u4ee5\u8c03\u7528ruby\u65b9\u6cd5<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Notify.test_email('1569964920@qq.com','robin gitlab','test').deliver_now<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ubuntu\u4e0b\u5b89\u88c5gitlab \uff08\u5fc5\u987b\u662f64\u4f4d\u7cfb\u7edf\uff09 gitlab \u662f\u4e00\u4e2a\u57fa\u4e8egit\u7684\u7248\u672c\u7ba1\u7406\u670d\u52a1\u5668 \u7531ruby\u7f16\u5199 \u7136\u800cgitlab\u7684\u5e94\u7528\u4e2d\u6709\u5404\u79cd\u8fdb\u7a0b\u4f5c\u4e3a\u8f85\u52a9\u529f\u80fd nginx redis posgresSQL \u7b49\u4e00\u7cfb\u5217\u7684\u8f85\u52a9\u8fdb\u7a0b \u4e3a\u4e86\u907f\u514d\u548c\u672c\u7ea7\u51b2\u7a81\u5e94\u8be5\u8bbe\u7f6e\u5176enabled\u4e3afalse \u7136\u540e\u8c03\u7528\u672c\u673a\u7684\u7b2c\u4e09\u65b9\u5e94\u7528 apt install gitlab-ce \u5b89\u88c5\u5b8c\u6210\u540e \u7f16\u5199 \/etc\/gitlab\/gitlab.rb (ruby\u6587\u4ef6) \u8fdb\u884c\u914d\u7f6e\uff0c\u6240\u6709\u914d\u7f6e\u90fd\u5e94\u8be5\u5728\u8fd9\u91cc\u5199 \u7136\u540e\u901a\u8fc7gitlab-ctl reconfigure \u90e8\u7f72\u5230\u5177\u4f53\u5e94\u7528\u4e0a \u4e0d\u5e94\u5728gitlab\u5177\u4f53\u7684\u5e94\u7528\u914d\u7f6e\u4e0a\u76f4\u63a5\u66f4\u6539 \u5982\u7f16\u5199gitlab\u81ea\u5e26\u7684nginx\u7684nginx.conf redis \u7684 redis.conf \u7b49 \u8fd0\u884c\u89e3\u6790 \u9996\u5148\u8fdb\u7a0b\u8dd1\u8d77\u5728puma\u4e2d\uff08\u65e7\u7248\u5728unicorn\uff09\u8dd1\u8d77http\u670d\u52a1\uff0c\u7136\u540e\u7531gitlab-workhorse \u4ee3\u7406 \u5c06http\u670d\u52a1\u8f6c\u79fb\u5230unix:socket\u4e2d\u3002\u7136\u540e\u901a\u8fc7\u6211\u4eec\u81ea\u5df1\u7684nginx \u628a\u8bf7\u6c42\u8f6c\u53d1\u5230 \u8fd9\u4e2asocket\u4e2d\u5373\u53ef \u90ae\u4ef6\u914d\u7f6e \uff1agitlab\u9700\u8981\u914d\u7f6e\u90ae\u4ef6\u53d1\u4ef6\u8d26\u53f7 \u6240\u4ee5\u5728smtp\u4e2d\u914d\u7f6e\u81ea\u5df1\u7684qq\u90ae\u7bb1 qq\u90ae\u7bb1\u9700\u5f00\u542fsmtp\u529f\u80fd \u914d\u914d\u7f6e\u6388\u6743\u7801 gitlab\u547d\u4ee4 gitlab-ctl help\/configure\/restart\/start\/stop gitlab-rails console \u8fdb\u5165\u63a7\u5236\u53f0 \u53ef\u4ee5\u8c03\u7528ruby\u65b9\u6cd5<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[38],"tags":[],"_links":{"self":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts\/288"}],"collection":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=288"}],"version-history":[{"count":3,"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts\/288\/revisions"}],"predecessor-version":[{"id":291,"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts\/288\/revisions\/291"}],"wp:attachment":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}