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 ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz | tar xz cd ruby-2.0.0-p247 ./configure make 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
sudo su - git git clone https://github.com/gitlabhq/gitlab-shell.git cd gitlab-shell git checkout v1.7.1 cp config.yml.example config.yml
emacs config.yml ./bin/install
Install MySQL and Setup
yum install mysql-server mysql mysql-devel mysql-libs /etc/init.d/mysqld start /usr/bin/mysql_secure_installation 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'; commit; \q
Upgrade ICULIB (RHEL5 is too old)
cd yum install gcc-c++ svn export http://source.icu-project.org/repos/icu/icu/tags/release-52-1/ cd release-52-1/source chmod +x runConfigureICU configure install-sh ./runConfigureICU Linux/gcc make make check make install
Leave a Reply