- 追加された行はこの色です。
- 削除された行はこの色です。
* Redmine [#fcecf732]
* Redmine インストール [#h2a30470]
** 概要 [#ga56b6c2]
- RedmineをLinuxにインストールする。
- OSにはPleskがインストールしてあり、Plesk上で作成したサイト(ヴァーチャルホスト)にサブディレクトリを切って、Redmineを公開する。
- Railsの実行にはPassengerを使う。
** インストール [#l81761a0]
OSはCentOS5。すでにRailsはインストール済みだったが、バージョンが古かったためインストールし直した。
** インストールするソフトウェアのバージョン [#n3cf0d8f]
- Redmine 0.8
- OS CentOS5
- Ruby 1.8.7
- RubyGems 1.3.5
- Rails 2.1.2
*** RPMforgeの追加 [#k06e1bd5]
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
rpm -ivh rpmforge-release-0.5.1-1.el5.rf.i386.rpm
cd /etc/yum.repos.d
cp rpmforge.repo rpmforge.repo.orig
sed -ie 's/enabled = [01]/enabled = 0/' /etc/yum.repos.d/rpmforge.repo
yum --enablerepo=rpmforge list
- http://rpmrepo.org/RPMforge/Using
*** 注意点 [#g13dd463]
- CentOS5にはすでにRubyとRailsがインストール済みだったが、バージョンが古かったためインストールし直した。
- Redmine0.8を利用するにはRails2.1.2である必要がある。
*** checkinstallのインストール [#r048961e]
yum --enablerepo=rpmforge install checkinstall
** インストールする場所(公開するURL) [#g9b8915e]
- Redmineのルートパス /var/www/redmine
- RedmineのURL http://example.com/redmine
- Apacheのドキュメントルート /home/httpd/vhosts/example.com/httpdocs
*** Rubyのアンインストール [#s560aed8]
rpm -e ruby
** 既存の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のインストール [#udc95348]
wget http://core.ring.gr.jp/archives/lang/ruby/ruby-1.8.7-p249.tar.gz
tar zxvf ruby-1.8.7-p249.tar.gz
cd ruby-1.8.7-p249
./configure --prefix=/usr
make
checkinstall --fstrans=no
rpm -ivh /usr/src/redhat/RPMS/i386/ruby-1.8.7-p249-1.i386.rpm
** Rubyをインストール [#u8f5f073]
別ページを参照。
*** gemをインストール [#zc5cf96e]
SRCを取得して、展開して、インストールコマンドを実行http://rubyforge.org/frs/?group_id=126&release_id=37073
ruby setup.rb
*** 既存のRailsをアンインストール [#e296b4a0]
rpm -e ruby-rails psa-rubyrails-configurator
*** Railsをインストール [#ld8d9841]
gem install rails
*** Redmineをインストール [#z5c078f5]
mkdir /home/redmine
cd /home
** 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/