天天看點

CentOS5.5上安裝redmine(基于apache+mysql)

我不熟悉apache2和ROR,參考了許多文檔,繞了許多彎路。

最重要的一份參考資料是

[size=large]HowTo install Redmine on CentOS 5

[url]http://www.redmine.org/projects/redmine/wiki/HowTo_install_Redmine_on_CentOS_5[/url][/size]

參照上文的步驟,以下是些要點:

[b]1[/b].apache2是系統自帶的。yum安裝mysql5。這一步要注意也安裝mysql-devel,不然後面bundle install mysql時會報錯。

[b]2[/b].根據這個文章

[url]http://www.redmine.org/projects/redmine/wiki/RedmineInstall[/url]

我要裝的是redmine1.1.2. 我的版本組合是

[b]ruby 1.8.7, rugygems 1.4.0, rails 2.3.5 ,rack 1.0.1[/b]

這裡組合關系不要錯,不然後面要花許多時間整理,還可能會失敗。

[b]3[/b].先裝ruby 1.8.7,再裝rugygems 1.4.0,再裝rails2.3.5,再裝rack 1.0.1.

[b]4[/b].“Install Passenger”時,會安裝自動安裝rake0.8.7.

[b]5[/b]."Configure Apache to host the documents"這一步,根據這個文章

[url]http://www.redmine.org/projects/redmine/wiki/HowTo_configure_Apache_to_run_Redmine[/url]

在httpd.conf最後加virtual host設定。

[b]6[/b].“Add the Bundler Boot and preinitializer code”這一步不用管。

[b]7[/b].“Create the Gemfile and register these gems in it”,Gemfile寫成

source 'http://rubygems.org'

gem 'rake', '0.8.3'
gem "rack", "1.0.1"
gem "i18n", "0.4.2"
gem "rubytree", "0.5.2", :require => "tree"
gem "RedCloth", "~>4.2.3", :require => "redcloth" # for CodeRay
gem "mysql"
gem "coderay", "~>0.9.7"
           

[b]8[/b].“Set the production environment (optional)”這一步,指的是

redmine/conf/environment.rb。

[size=medium][b]備注:[/b][/size]

1.[url]http://geekystuff.net/2009/1/14/remove-all-ruby-gems[/url]

這個裡面介紹的删除所有gems的技巧

gem list | cut -d" " -f1 | xargs gem uninstall -aIx

很有用。

2.另外這篇文章也值得參考:

[url]http://apps.hi.baidu.com/share/detail/30235554[/url]