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
Install Gitlab-Shell
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)
as root:
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
After building libicu from source and running ‘bundle exec rake gitlab:setup RAILS_ENV=production’ I get this error:
“/opt/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes-0.6.9.4/lib/charlock_holmes/charlock_holmes.so: undefined symbol: _ZN6icu_528ByteSink15GetAppendBufferEiiPciPi – /opt/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/charlock_holmes-0.6.9.4/lib/charlock_holmes/charlock_holmes.so”
I have tried everything I can think of (and Googled like crazy) to get past this. Any recommendations?
I’m not sure why you have a Ruby 1.9 install there? Might try ensuring you have only Ruby 2.0 in your path?
Um, because I followed another guide and didn’t read yours carefully.
Fixing that I am still effectively at the same point. I have to install everything, including libicu, in ~gitlab. Unfortunately it’s not my server and I have to be noninvasive to the system. I’m very much a Ruby noob and don’t have a grasp on what it takes to point bundle to a nonstandard path.
Ah no worries:) I’m also a Ruby noob and am not sure how to do this without full server/root access:(
Oh, I have root, I just need to not disturb existing system libraries. There is another application that has legacy dependencies, sadly.
I have read about using –with-icu-dir to bundle but read conflicting posts. One says to point to the installed location (/usr/local, for instance) and another says to point to unpacked source tree. The latter doesn’t make sense to me…
Oh, I have root, I just need to not disturb existing system libraries. There is another application that has legacy dependencies, sadly.
I have read about using –with-icu-dir to bundle but read conflicting posts. One says to point to the installed location (/usr/local, for instance) and another says to point to unpacked source tree. The latter doesn’t make sense to me…
Sorry about the double-post. The first didn’t show up after a refresh..