Skip to content

Instantly share code, notes, and snippets.

@coder36
Last active August 29, 2015 14:01
Show Gist options
  • Save coder36/7b7479c48d996a83bed0 to your computer and use it in GitHub Desktop.
Save coder36/7b7479c48d996a83bed0 to your computer and use it in GitHub Desktop.
Setting up Gitlab on Centos 6.5

Setting up Gitlab on Centos 6.5

Based on this guide

Notes:

     root / 5iveL!fe

Set Hostname

Set up your hostname

sudo hostname gitlab

Edit /etc/hosts:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 gitlab

Edit /etc/sysconfig/network, setting:

HOSTNAME=gitlab

Installing

Download rpm from here

sudo yum install ./gitlab-6.8.2_omnibus-1.el6.x86_64.rpm

Then run:

sudo gitlab-ctl reconfigure
sudo gitlab-ctl status

Fix nginx

Edit /var/opt/gitlab/nginx/etc/gitlab-http.conf . Search for server_name and change to:

server_name gitlab

Fix logging

sudo touch /opt/gitlab/embedded/service/gitlab-rails/log/sidekiq.log
sudo chown git:git /opt/gitlab/embedded/service/gitlab-rails/log/sidekiq.log
chmod 644 /opt/gitlab/embedded/service/gitlab-rails/log/sidekiq.log

Proxy

When running behind a proxy edit /opt/gitlab/sv/sidekiq/run, adding the following line:

export http_proxy=http://127.0.0.1:3128
export https_proxy=http://127.0.0.1:3128
export HTTP_PROXY=http://127.0.0.1:3128
export HTTPS_PROXY=http://127.0.0.1:3128
export no_proxy=.slc.co.uk

This allows the import feature to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment