* Redmine インストール [#h2a30470]
** 概要 [#ga56b6c2]
- RedmineをLinuxにインストールする。
- OSにはPleskがインストールしてあり、Plesk上で作成したサイト(ヴァーチャルホスト)にサブディレクトリを切って、Redmineを公開する。
- Railsの実行にはPassengerを使う。

** インストールするソフトウェアのバージョン [#n3cf0d8f]
- Redmine 0.8
- OS CentOS5
- Ruby 1.8.7
- RubyGems 1.3.5
- Rails 2.1.2 

*** 注意点 [#g13dd463]
- CentOS5にはすでにRubyとRailsがインストール済みだったが、バージョンが古かったためインストールし直した。
- Redmine0.8を利用するにはRails2.1.2である必要がある。

** インストールする場所(公開するURL) [#g9b8915e]
- Redmineのルートパス /var/www/redmine
- RedmineのURL http://example.com/redmine
- Apacheのドキュメントルート /home/httpd/vhosts/example.com/httpdocs

** 既存のRubyとRailsをアンインストール [#s560aed8]
 rpm -e ruby ruby-rails psa-rubyrails-configurator
 cd /usr/lib/ruby
 mkdir NOT_IN_USE
 mv 1.8 gems site_ruby vendor_ruby NOT_IN_USE/

** Rubyをインストール [#u8f5f073]
別ページを参照。

** Railsをインストール [#ld8d9841]
 gem install rails -v=2.1.2

** Redmineをインストール [#z5c078f5]
 cd /var/www
 mkdir redmine
 svn checkout http://redmine.rubyforge.org/svn/branches/0.8-stable redmine

** ウェブサイト(ヴァーチャルホスト)を作成 [#xd6b8064]
Pleskを利用する。

** Redmineの設定 [#v2162b0f]
 cd /var/www/redmine
 cat > config/database.yml
 production:
   adapter: sqlite3
   dbfile: db/redmine.db
   timeout: 5000
 (CTRL+D)
 cp config/email.yml.example config/email.yml
 rake config/initializers/session_store.rb
 rake db:migrate RAILS_ENV=production
 rake load_default_data RAILS_ENV=production

*** 設定 [#c90b083f]
 ENV['RAILS_ENV'] ||= 'production'
 ENV['GEM_HOME'] ||= '/usr/local/lib/ruby/gems'
 ENV['RUBYLIB'] ||= '/usr/local/lib'
config/enviroment.rbに以上の設定を追加する。

*** 組込みサーバで起動を試す [#y2d1a81a]
 ./script/server -e production

** passengerのインストール [#q4a027b8]
 gem install passenger
 passenger-install-apache2-module
/usr/local/lib/ruby/gems/binにパスを通しておく。

** Apacheの設定 [#n50f39b6]
*** ドキュメントルート以下にシムリンクを張る [#qe2aef6c]
 ln -s /var/www/redmine /home/httpd/vhosts/example.com/httpdcos/redmine
- PassengerではAliasは使えないらしい。
- http://blog.suz-lab.com/2009/05/passengerredmine.html
*** Apacheの設定を追加する [#g854345d]
 <Directory /home/httpd/vhosts/example.com/httpdocs>
   Options All
   AllowOverride All
 </Directory>
 RailsBaseURI /redmine
 LoadModule passenger_module /usr/local/lib/ruby/gems/gems/passenger-2.2.9/ext/apache2/mod_passenger.so
 PassengerRoot /usr/local/lib/ruby/gems/gems/passenger-2.2.9
 PassengerRuby /usr/local/bin/ruby
- /home/httpd/vhosts/example.com/conf/vhost.conf
- httpd.includeはPleskが管理するので、vhost.confを利用する。

*** vhost.confを有効にする [#l353f5ff]
 /usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=example.com
 /etc/init.d/httpd restart

** 参考 [#j7fafe3c]
- http://redmine.jp/tech_note/install/
- http://redmine.jp/guide/RedmineInstall/

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS