-
Notifications
You must be signed in to change notification settings - Fork 2
Install (RedHat CentOS Fedora)
Install ruby 1.9.2
This is work in progress, I tested on RHEL6 and install went OK but running gitlabhq complained about undefined method `highlight'
which is coming from pygments. RH also ships with python 2 and I wasn't able to find an rpm with python 3 unless you want to compile from source which breaks your entire system since lots of utils depend on python2.
Become root
su -
Make sure you have the prerequisite packages
yum install git-core curl sqlite sqlite-devel
yum groupinstall "Development Tools" "Development Libraries"
Download, extract and build Ruby 1.9
cd /opt
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
Download, extract and install RubyGems
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
If you already have rubygems, upgrade to latest version
gem update --system
We don't want to download documentation
echo "gem: --no-rdoc --no-ri" > ~/.gemrc
Install Gitosis
It will create a profile 'gitosis:git' on your system
yum install gitosis
adduser -r -s /bin/sh -c 'git version control' -U -m git
ssh-keygen -t rsa
sudo -H -u git gitosis-init < ~/.ssh/id_rsa.pub
sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
Install GitLab
cd /home
git clone git://github.com/gitlabhq/gitlabhq.git
cd gitlabhq/
Install this library first
yum install python-pygments
gem install bundler
bundle
Note: If you get issues with installing gems see: http://stackoverflow.com/questions/3605235/rails-3-passenger-cant-find-git-gems-installed-by-bundler
Prepare the database
bundle exec rake db:setup RAILS_ENV=production
# create admin user
# [email protected]
# pass.....5iveL!fe
bundle exec rake db:seed_fu RAILS_ENV=production
Start the server http://localhost:3000
rails s -e production
or as daemon
rails s -e production -d