Skip to content

Instantly share code, notes, and snippets.

@kymtwyf
Created December 21, 2015 12:40
Show Gist options
  • Save kymtwyf/4fbb1e23514a7851aa01 to your computer and use it in GitHub Desktop.
Save kymtwyf/4fbb1e23514a7851aa01 to your computer and use it in GitHub Desktop.
gitlab 改默认端口, 以及一些配置错误

改默认端口:

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment