This is for setting up Gitorious on Centos 6.
Based on the guide here: http://famousphil.com/blog/2011/06/installing-gitorious-on-centos-5-6-x64/
yum install git-core git-svn java-1.6.0-openjdk apg pcre pcre-devel zlib zlib-devel libyaml-devel GeoIP-devel sphinx mysql-devel mysql-server mysql
yum install -y tcl-devel libpng-devel libjpeg-devel ghostscript-devel bzip2-devel freetype-devel libtiff-devel ImageMagick-devel
yum install /src/files/repos/rhel6/remi-release-6.rpm
# useradd -d /home/git git # su - git $ mkdir {log,conf} $ mkdir -p data/{repos,tarballs,tarballs-work}
# chmod 755 /home/git # chmod 777 /home/git/data/
# service mysqld start # /usr/bin/mysql_secure_installation
# mysql -u root -p mysql> create database gitorious; mysql> create database gitorious_test; mysql> create database gitorious_dev; mysql> CREATE user 'git'@'localhost' IDENTIFIED BY '<PASWORD>'; mysql> GRANT ALL ON gitorious.* TO 'git'@'localhost'; mysql> GRANT ALL ON gitorious_test.* TO 'git'@'localhost'; mysql> GRANT ALL ON gitorious_dev.* TO 'git'@'localhost'; mysql> FLUSH privileges; mysql> exit;
# chkconfig mysqld on
git clone git://gitorious.org/gitorious/mainline.git gitorious
$ git clone /src/files/git/gitorious gitorious
$ cd gitorious $ mkdir tmp/pids $ exit # ln -s /home/git/gitorious/script/gitorious /usr/local/bin/gitorious # cd /home/git/gitorious # chmod ug+x script/* # chmod -R g+w config/ log/ public/ tmp/
# gem install bundle # cd /home/git/gitorious # bundle install # bundle exec rake gems:install or if that fails, # bundle exec rake gems:install RAILS_ENV=production # gem install stompserver (it wasn't installed with the bundle)
chmod 0666 /home/git/gitorious/log/production.log ln -s /home/git/gitorious/doc/templates/centos/git-daemon /etc/init.d/git-daemon chkconfig --add git-daemon service git-daemon start ** see note/fix below ln -s /home/git/gitorious/doc/templates/centos/stomp /etc/init.d/stomp chkconfig --add stomp service stomp start ** need to add: /home/git/gitorious/tmp/stomp/log/ ** need to run: gem install stompserver ln -s /home/git/gitorious/doc/templates/centos/git-poller /etc/init.d/git-poller chkconfig --add git-poller service git-poller start
# git clone git://github.com/roman/rots.git
# cd rots && gem build rots.gemspec && gem install rots-0.2.1.gem
rm -rf /usr/lib/ruby/gems/1.8/bundler/gems/rots-babb5559aae8
/var/www/gitorious/Gemfile
: # replace: gem ''"rots", :git => 'https://github.com/roman/rots.git' '' # with gem ''"rots", "~> 0.2.1"''
# bundle install && bundle pack
# export RAILS_ENV=production && \ bundle exec rake db:create && \ bundle exec rake db:migrate && \ bundle exec rake ultrasphinx:bootstrap
# vim /etc/httpd/conf.d/xsendfile.conf #add below LoadModule line XSendFile on XSendFilePath /home/git/data/tarballs XSendFilePath /home/git/data/repos
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.11 PassengerRuby /usr/bin/ruby <VirtualHost *:80> ServerName www.yourhost.com DocumentRoot /somewhere/public # <-- be sure to point to 'public'! <Directory /somewhere/public> AllowOverride all # <-- relax Apache security settings Options -MultiViews # <-- MultiViews must be turned off </Directory> </VirtualHost>
su git cd ~/gitorious env RAILS_ENV=production script/create_admin #sample Type in Administrator's e-mail: admin@matthouse.us Type in Administrator's password: <APASSWORD> Admin user created successfully. exit
# cd /home/git/gitorious # bundle exec rake ultrasphinx:configure RAILS_ENV=production # bundle exec rake ultrasphinx:index RAILS_ENV=production # bundle exec rake ultrasphinx:daemon:start RAILS_ENV=production
# yum install aspell # aspell config dict-dir # cp vendor/plugins/ultrasphinx/examples/ap.multi /usr/lib64/aspell-0.60/ # bundle exec rake ultrasphinx:spelling:build - edit ultrasphinx config ''/home/git/gitorious/config/ultrasphinx/production.conf'': <code> #change "address" to "listen" due to deprecation listen = 0.0.0.0
# ln -s /home/git/gitorious/doc/templates/centos/git-ultrasphinx /etc/init.d/git-ultrasphinx # chkconfig --add git-ultrasphinx # service git-ultrasphinx start
# cd /var/www/gitorious # git submodule init # git submodule update # cd public/javascripts # rm all.js (it's probably empty)
yum install git-core git-svn java-1.6.0-openjdk vim-* apg pcre pcre-devel zlib zlib-devel libyaml-devel GeoIP-devel sphinx mysql-devel mysql-server mysql No package apg available. Package pcre-7.8-3.1.el6.x86_64 already installed and latest version Package zlib-1.2.3-27.el6.x86_64 already installed and latest version No package libyaml-devel available. No package GeoIP-devel available. No package sphinx available.
using config file '/home/git/gitorious/config/ultrasphinx/production.conf'... WARNING: key 'address' is deprecated in /home/git/gitorious/config/ultrasphinx/production.conf line 10; use 'listen' instead.
# wget http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise-1.8.7-2011.03.tar.gz # tar xzf blah # yum install gcc-c++ make zlib-devel openssl-devel readline-devel # cd ruby-en... # ./install (accept defaults)