GitLab is a free (they also have a paid enterprise version) and open source software package to make managing a Git server easier.  It provides a nice web admin, detailed user and group permissions, and much more.  I looked at gitolite however I was unable to get it working correctly after several frustrating days, and GitLab looked like a more refined option with better documentation and support.

The only problem is that all the installation documentation is geared for Ubuntu, and doesn’t work well with RHEL 5.  I’ve fought through some of the issues and have it working.  I wanted to share some of the steps I had to take to get it playing nicely with RHEL 5.  Many of these steps may also apply to other Linux systems with older packages.

Python – The default Python install is too old

yum install python26
yum install python-docutils.noarch
unlink /usr/bin/python2
cd /usr/bin/
ln -s python26 python2

Ruby – The default Ruby install is too old

yum remove ruby
mkdir /tmp/ruby && cd /tmp/ruby
curl --progress | tar xz
cd ruby-2.0.0-p247
make install

rm /usr/bin/ruby
ln -s /usr/local/bin/ruby /usr/bin/ruby

gem install bundler --no-ri --no-rdoc
gem install rails

Install Gitlab-Shell

sudo su - git

git clone
cd gitlab-shell
git checkout v1.7.1
cp config.yml.example config.yml
# Edit config and replace gitlab_url with something like ‘‘  and change paths from /home/git to /opt/git
emacs config.yml

Install MySQL and Setup

yum install mysql-server mysql mysql-devel mysql-libs
/etc/init.d/mysqld start
mysql -u root
CREATE USER 'gitlab'@'localhost' IDENTIFIED BY ‘password';     
CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
GRANT SELECT, LOCK TABLES, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlabhq_production`.* TO 'gitlab'@'localhost';

Upgrade ICULIB (RHEL5 is too old)

as root:

yum install  gcc-c++
svn export
cd release-52-1/source
chmod +x runConfigureICU configure install-sh
./runConfigureICU Linux/gcc
make check
make install

Install GitLab

Follow the install docs and good luck!!!