改默认端口:
sudo vim /etc/gitlab/gitlab.rb
把external_url 改为 http://yourdomain.com:port
我在运行sudo gitlab-ctl reconfigure
之后查看gitlab status:
sudo gitlab-ctl status
看到以下信息:
warning: gitlab-workhorse: unable to open supervise/ok: access denied
warning: logrotate: unable to open supervise/ok: access denied
warning: nginx: unable to open supervise/ok: access denied
warning: postgresql: unable to open supervise/ok: access denied
warning: redis: unable to open supervise/ok: access denied
warning: sidekiq: unable to open supervise/ok: access denied
warning: unicorn: unable to open supervise/ok: access denied
多次尝试之后重启了一下居然好了:
sudo gitlab-ctl restart
后来又遇到一个问题:
opt/gitlab/embedded/service/gem/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:774:in `initialize': Permission denied @ rb_sysopen - /var/log/gitlab/unicorn/unicorn_stderr.log (Errno::EACCES)
简单粗暴地把 /var/log 设为777 搞定:
sudo chown -R 777 /var/log