Step 1: Install needed packages
You will need remove installed Ruby because repo version is 1.8.7 and we need 1.9 at least
Yum remove Ruby
Yum install wget
Enable epel Repos
Wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
Rpm-uvh epel-release-6-5.noarch.rpm
Install required Libraries
Yum install Readline-devel libyaml-devel gdbm-devel ncurses-devel redis OpenSSL-devel zlib-devel GCC gcc-C ++ make Autoconf Readline-devel curl-devel expat-devel gettext- devel TK-devel libxml2-devel libffi-devel libxslt-devel libicu-devel httpd-devel gitolite Git-All Python-devel Python-pip SQLite-devel Sendmail Vim mysql-devel
Step 2: Install Ruby 1.9.3
Wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
Tar xzvf ruby-1.9.3-p0.tar.gz
CD ruby-1.9.3-p0
./Configure
Make
Make install
Step 3: Install gitolite
Create gitolite-admin user
Useradd-D/home/gitolite-Admin
Generate RSA key pair for gitolite-admin user
Su gitolite-Admin
Ssh-keygen
Exit
Move generate public key to gitolite home dir
CP/home/gitolite-admin/. Ssh/id_rsa.pub/var/lib/gitolite/id_rsa_gitolite_admin.pub
Chown gitolite: gitolite/var/lib/gitolite/id_rsa_gitolite_admin.pub
Complete gitolite and gitolite-admin users pairing
Su gitolite
Gl-Setup/var/lib/gitolite/id_rsa_gitolite_admin.pub
A editor will opened changue repo permissions to 0007
$ Repo_umask to 0007
Exit
Su gitolite-Admin
CD
Git clone gitolite @ localhost: gitolite-Admin
In the last command you clone the gitolite-Admin Repo On gitolite-Admin's home. gitolite-Admin repo is gitolite config
Before continue we need configure gitolite-Admin git Profile
Git config-global user. Email "gitolite-admin @ localhost"
Git config-global user. Name "gitolite-admin"
Exit
Add gitolite-Admin to gitolite Group
Usermod-a-g gitolite-Admin
Changue gitolite-Admin Password
Passwd gitolite-Admin
Step 6 launch redis
Chkconfig redis on
/Etc/init. d/redis start
Step 7 gitlab
Clone gitlab sourcecode
CD/var/WWW
Git clone git: // github.com/gitlabhq/gitlabhq.git
Chown-r gitolite-Admin: gitolite-Admin gitlabhq/
CD gitlabhq/
Install phython Dependencies
Pip-Python install pygments
Install required gems
Gem install bundler
Bundle install
Su gitolite-Admin
Bundle install
Prepare config files
CP config/database. yml. Example config/database. yml
CP config/gitlab. yml. Example config/gitlab. yml
Prepare production Enviroment
Rails_env = production rake DB: Setup
Rails_env = production rake DB: seed_fu
You will get these login data
Login ......... Admin@local.host
Password ...... 5 ivel! Fe
Config gitolite gitlab Link
Vim config/gitlab. yml
Your git_host: section must be like this
# Git hosting congiguration
Git_host:
System: gitolite
Admin_uri: gitolite @ localhost: gitolite-Admin
Base_path:/var/lib/gitolite/repositories/
HOST: localhost
Git_user: gitolite
# Port: 22
Fix gitolite Permissions
Chmod-r 770/var/lib/gitolite/repositories/
Try your installation launching webrick
Bundle exec rails s-e Production
Open a Web broser, write yourhost: 3000 and check if everything is working if you get an error send me a comment
Install passenger for Apache
Gem install passenger
Passenger-install-apache2-module
Follow screen instructions
Edit Apache Config File
Vim/etc/httpd/CONF/httpd. conf
And append these lines at the end
Loadmodule passenger_module/usr/local/lib/Ruby/gems/1.9.1/gems/Passenger-3.0.11/EXT/apache2/mod_passenger.so
Passengerroot/usr/local/lib/Ruby/gems/1.9.1/gems/Passenger-3.0.11
Passengerruby/usr/local/bin/Ruby
Enable apache service
/Etc/init. d/httpd start
Chkconfig httpd on
Sources
Http://wasil.org/en/gitlab-installation-on-fedora-16-with-gitolite
Http://rickfoosusa.blogspot.com/2011/08/gitolite-tutorial-senawario.html
Source http://luzem.dyndns.org/2012/03/12/installing-gitlab-2-1-on-centos-6/