gitlabhq/gitlabhq — Issue #429: Proposed CentOS Gitlabhq Install
Author: twoflowers
Created: 2012-02-20 14:38:38+00:00
State: open

I decided to redo the install of our gitlabhq, here are the steps that I took. Thought that this might help others not using Ubuntu

This is all assuming that you are root when first starting

-- add the gitlab user
adduser gitlabhq
passwd gitlabhq

vi /etc/sudoers

gitlabhq ALL=(ALL) ALL

su gitlabhq
-- create ssh key
ssh-keygen -t rsa

# As root
-- add the repo needed to get git
sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm

-- some tools needed
yum groupinstall "Development Tools" "Development Libraries"

-- install git and sqlite
yum install git-core curl

-- install sqlite3 (root)
wget http://www.sqlite.org/sqlite-autoconf-3070603.tar.gz
tar xzf sqlite-autoconf-3070603.tar.gz
cd sqlite-autoconf-3070603
./configure
make && make install

-- install ruby (root)
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz
tar xfvz ruby-1.9.2-p290.tar.gz
cd ruby-1.9.2-p290
./configure
make && make install

-- install ruby gems (root)
cd /opt
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.10.tgz
tar xzvf rubygems-1.8.10.tgz
cd rubygems-1.8.10
ruby setup.rb

-- install gitolite (root)
yum install openssh-server

adduser --shell /bin/sh --base-dir /home/git git

cp /home/gitlabhq/.ssh/id_rsa.pub /home/git/rails.pub

# su git
-- as git user
git clone git://github.com/gitlabhq/gitolite /home/git/gitolite

/home/git/gitolite/src/gl-system-install
# update file, umask = 0007
sh -c "PATH=/home/git/bin:$PATH; gl-setup ~/rails.pub"

-- As root
chmod -R g+rwX /home/git/repositories/
chown -R git:git /home/git/repositories/

yum install python-devel python-pip sendmail redis libicu-devel
easy_install pygments
gem install bundler

# su gitlabhq
-- as gitlab user
export GIT_SSL_NO_VERIFY=true

git clone -b stable git://github.com/gitlabhq/gitlabhq.git
cd gitlabhq
sudo gem install charlock_holmes -v '0.6.8'

bundle install --without development test

bundle exec rake db:setup RAILS_ENV=production
bundle exec rake db:seed_fu RAILS_ENV=production

bundle exec rails s -e production

login.........admin@local.host
password......5iveL!fe