Install gitlabhq on redhat 5

服务器版本比较老, redhat 5.3,一下记录安装gitlabhq的过程。

修改了用unicorn+nginx的启动方式

一些注意的地方

  • Rails.logger.instance_variable_get(:@logger).instance_variable_get(:@log_dest).sync = true if Rails.logger

git

  • compile

ruby

  • install ruby 1.9.2 from source
  • gem install bundler

gitolite

  • adduser -r -m –shell /bin/sh –comment ‘git version control’ git
  • ssh-keygen -t rsa # create SSH keys for current account
  • cp ~/.ssh/id_rsa.pub /home/git/git.pub #Now we need to save the public key because we need it later for our gitolite installation:
  • su - git
  • git clone git://github.com/gitlabhq/gitolite /home/git/gitolite
  • /home/git/gitolite/src/gl-system-install
  • sh -c “PATH=/home/git/bin:$PATH; gl-setup ~/git.pub”
    open .gitolite.rc, change the repository path, set umask as 0007!!
  • chmod -R g+rwX /opt/gitspace/repositories/ #this path is your set in .gitolite.rc
  • rm git.pub #don’t need it anymore

packages required for gitlabhq

  • python & pip
  • pip install pygments
  • install redis from source

gitlabhq

  • git clone -b stable git://github.com/gitlabhq/gitlabhq.git
  • gem install charlock_holmes -v ‘0.6.8’ (yum install libicu)
  • bundle install –without development test
  • bundle exec rake db:setup RAILS_ENV=production
  • bundle exec rake db:seed_fu RAILS_ENV=production