{"id":36,"date":"2018-10-10T21:33:02","date_gmt":"2018-10-10T13:33:02","guid":{"rendered":"http:\/\/localhost\/qiqi\/?p=36"},"modified":"2018-10-10T22:00:38","modified_gmt":"2018-10-10T14:00:38","slug":"centos-git-lab","status":"publish","type":"post","link":"https:\/\/adeqing.com\/index.php\/2018\/10\/10\/default\/36\/","title":{"rendered":"centos git lab"},"content":{"rendered":"<p>Running handlers:<br \/>\nThere was an error running gitlab-ctl reconfigure:<br \/>\nexecute[\/opt\/gitlab\/embedded\/bin\/initdb -D \/var\/opt\/gitlab\/postgresql\/data -E UTF8] (postgresql::enable line 80) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received &#8216;1&#8217;<br \/>\n&#8212;- Begin output of \/opt\/gitlab\/embedded\/bin\/initdb -D \/var\/opt\/gitlab\/postgresql\/data -E UTF8 &#8212;-<br \/>\nSTDOUT: The files belonging to this database system will be owned by user &#8220;gitlab-psql&#8221;.<br \/>\nThis user must also own the server process.<br \/>\n\u89e3\u51b3\u65b9\u6cd5\uff1a<br \/>\nexport LC_CTYPE=en_US.UTF-8<br \/>\nexport LC_ALL=en_US.UTF-8<br \/>\nsudo dpkg-reconfigure locales<\/p>\n<p>2.1\u914d\u7f6e\u8bbf\u95ee\u8def\u5f84<br \/>\n\u70b9\u51fbSetting up a domain name\/URL<br \/>\n\uff0c\u6b64\u5904\u6709\u5b98\u65b9\u6587\u6863\u8be6\u7ec6\u7684\u914d\u7f6e\u8bf4\u660e\uff0c\u5c0f\u5f1f\u5728\u6b64\u5904\u4e5f\u662f\u4e5f\u6b64\u6587\u6863\u4e3a\u8bf4\u660e\uff0c\u5728\u5b89\u88c5\u7ed3\u675f\u4e4b\u540e\uff0c\u5728\u6b64\u914d\u7f6e\u6587\u4ef6\u4e2d\/etc\/gitlab\/gitlab.rb\u4fee\u6539\u5982\u4e0b\uff1a<br \/>\nexternal_url &#8220;http:\/\/gitlab.example.com&#8221;<\/p>\n<p>\u4f8b\u5982\u672c\u4eba\u8bbe\u7f6e\u7684\u5982\u4e0b\uff1a<br \/>\nexternal_url &#8216;http:\/\/10.200.80.255&#8217;\u8bbe\u7f6e\u5b8c\u6210\u4e4b\u540e\uff1a<\/p>\n<p>\u91cd\u7f6e\u914d\u7f6e<br \/>\nsudo gitlab-ctl reconfigure<br \/>\n\u91cd\u542fgitlab\u670d\u52a1<br \/>\nsudo gitlab-ctl restart\u6b64\u65f6\uff0c\u5728\u6d4f\u89c8\u5668\u6c47\u603b\u8f93\u5165http:\/\/10.800.80.255\u9ed8\u8ba4\u7aef\u53e3\u662f80\uff0c\u5c31\u80fd\u8bbf\u95ee\u5230gitlab\u7684\u9996\u9875\u4e86\uff0c\u521d\u59cb\u5316\u4f1a\u8ba9\u4f60\u8bbe\u7f6e\u7ba1\u7406\u5458\u5bc6\u7801\u3002\u6b64\u65f6\u4f7f\u7528\uff1a<br \/>\nroot+\u4f60\u8bbe\u7f6e\u7684\u5bc6\u7801\u5c31\u80fd\u8bbf\u95ee\u3002<\/p>\n<p>2.2\u914d\u7f6e\u8bbf\u95ee\u7aef\u53e3<br \/>\n\u6709\u7684\u65f6\u5019\u9ed8\u8ba4\u768480\u7aef\u53e3\u88ab\u5360\u7528\u4e86\uff0c\u9700\u8981\u4f60\u66f4\u6539\u7aef\u53e3\uff0c\u5b98\u7f51\u4e2d\u8bf4\u9053:<br \/>\nSetting the NGINX listen port\uff1a<br \/>\nBy default NGINX will listen on the port specified in external_url or implicitly use the right port (80 for HTTP, 443 for HTTPS). If you are running GitLab behind a reverse proxy, you may want to override the listen port to something else. For example, to use<br \/>\n port 8081:<br \/>\nnginx[&#8216;listen_port&#8217;] = 8081<\/p>\n<p>\u540c\u7406\uff0c\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\/etc\/gitlab\/gitlab.rb\u4fee\u6539\u5982\u4e0b\uff1a<br \/>\nnginx[&#8216;listen_port&#8217;] = 8081<\/p>\n<p>\u4f5c\u8005\uff1a\u793e\u4f1a\u4f60song\u54e5<br \/>\n\u94fe\u63a5\uff1ahttps:\/\/www.jianshu.com\/p\/75590f1ae35b<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Running handlers: There was an error running gitlab-ctl [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/posts\/36"}],"collection":[{"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/comments?post=36"}],"version-history":[{"count":3,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/posts\/36\/revisions"}],"predecessor-version":[{"id":39,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/posts\/36\/revisions\/39"}],"wp:attachment":[{"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/media?parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/categories?post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adeqing.com\/index.php\/wp-json\/wp\/v2\/tags?post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}