基本ここを参照
https://gitorious.org/gitorious/pages/Rhel_Installation
mod_xsendfileはリンク切れしているので
https://tn123.org/mod_xsendfile/
ここからダウンロード
普通にrubyをyumで入れるとgemが新しすぎるので(rakeがおかしいのか)
1.4系にする。
http://cjohansen.no/en/ruby/setting_up_gitorious_on_your_own_server
ruby-enterpriseでgem入れててもruby setup.rbで正しく置き換えてくれた。
cd ~/
mkdir src
cd src
wget http://rubyforge.org/frs/download.php/73882/rubygems-1.4.2.tgz
tar xvzf rubygems-1.4.2.tgz
cd rubygems-1.4.2
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
Cookie Secretの設定が相当長くないといけないらしい。
https://www.verisign.co.jp/ssl/help/csr/capache_new.html
rsa key作って入れた。
yamlに複数行入れるときは
property : |
hogehoge
fugafuga
hogehogeの前のスペースインデント忘れちゃダメです。
rake ultrasphinx周りでエラーが出た。
設定ファイルがconflictしてるっぽい。
$ rake ultrasphinx:index RAILS_ENV=production
WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead.
at /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/rdoctask.rb
mkdir -p /var/www/gitorious/db/sphinx/
$ indexer --config '/var/www/gitorious/config/ultrasphinx/production.conf' --all
Sphinx 0.9.9-release (r2117)
Copyright (c) 2001-2009, Andrew Aksyonoff
using config file '/var/www/gitorious/config/ultrasphinx/production.conf'...
WARNING: key 'address' is deprecated in /var/www/gitorious/config/ultrasphinx/production.conf line 10; use 'listen' instead.
indexing index 'main'...
ERROR: index 'main': sql_range_query: Unknown column 'base_tags.name' in 'field list' (DSN=mysql://gitorious_prd:***@localhost:3306/gitorious_prd).
total 0 docs, 0 bytes
total 0.135 sec, 0 bytes/sec, 0.00 docs/sec
total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
↓に従ってbase_tags->tagsに置換
vi config/ultrasphinx/production.conf
あと、XSendFileAllowAboveってプロパティはもう無いっぽい
http://stackoverflow.com/questions/3998111/xsendfile-wont-serve-the-files-in-apache-2-2
以上でいちおう起動した