2008-05-01
FreeBSD上でRedmineを試してみる
2ヶ月ほどTracを試してみましたが、1つのサイトで1つのプロジェクトしか基本的に管理できないというところがどうしても使いづらかったです。代わりになるものを探していたところ、Redmineというのが複数プロジェクトを管理できるというそうなので試してみました。
RedmineはJean-Philippe Lang氏によって開発・公開されているオープンソースソフトウェアです。RoRで構築されており、複数のプロジェクトを管理することができるのが特徴です。現在のRedmineのバージョンは4月28日(フランス時間)に公開されたv0.7.0で、GNU GENERAL PUBLIC LICENSE Version 2のもとで公開されています。
実行環境は次のとおりです。
- FreeBSD 8.0-CURRENT : Fri Apr 21 11:55:00 JST 2008 (i386)
- Apache-2.2.8
- Subversion-1.4.6_1
- SQLite 3.5.6
インストールした環境ではRuby関連のアプリケーションを何もインストールしていなかったため、ここではビルドに必要なものからインストールしていきます。(Redmine v0.7.0では、Rails 2.0.2が必須となっているようです)
インストールについて
を参考にさせていただきました。ありがとうございます。
必要なアプリケーションをインストール
rake時に必要なアプリケーションを先にportsからインストールしておきます。
- converters/ruby-iconv
- databases/rubygems-sqlite3
- devel/rubygem-rake
- www/rubygem-rails
Redmineのダウンロード
リポジトリからチェックアウトします。
# svn checkout http://redmine.rubyforge.org/svn/trunk/
SQLiteでデータベース作成
SQLite3でデータベースを作成します。
# sqlite3 redmine SQLite version 3.5.6 Enter ".help" for instructions sqlite > .exit
database.ymlの修正
# cp ./trunk/config/database.yml.example database.yml # vi database.yml
database.yml
production: adapter: sqlite3 dbfile:db/redmine timeout: 5000
rake
# rake db:migrate RAILS_ENV="production" # rake redmine:load_default_data RAILS_ENV="production"
動作確認テスト
# ruby script/server -e production
Webブラウザで http://localhost:3000/ にアクセスし、動作していたらOKです。
Apacheの設定
Phusion Passengerを使用し、Apache上でRedmineを動作させる設定をします。
# gem install rails --version 2.0.2 # gem install passenger
特に問題がなければ、次のようなメッセージが表示されます。
The Apache 2 module was successfully installed.
Please edit your Apache configuration file, and add these lines:
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-1.0.3/ext/apache2/mod_passenger.so
RailsSpawnServer /usr/local/lib/ruby/gems/1.8/gems/passenger-1.0.3/bin/passenger-spawn-server
RailsRuby /usr/local/bin/ruby18
After you restart Apache, you are ready to deploy any number of Ruby on Rails
applications on Apache, without any further Ruby on Rails-specific
configuration!
Press ENTER to continue.
--------------------------------------------
Deploying a Ruby on Rails application: an example
Suppose you have a Ruby on Rails application in /somewhere. Add a virtual host
to your Apache configuration file, and set its DocumentRoot to
/somewhere/public, like this:
<VirtualHost *:80>
ServerName www.yourhost.com
DocumentRoot /somewhere/public
</VirtualHost>
And that's it! You may also want to check the Users Guide for security and
optimization tips and other useful information:
/usr/local/lib/ruby/gems/1.8/gems/passenger-1.0.3/doc/Users guide.html
Enjoy Passenger, a product of Phusion (www.phusion.nl) :-)
http://www.modrails.com/
メッセージのとおりにhttpd.confとhttpd-vhosts.confに追記します。ここではVirtualHostのPortを8080に変更しています。
Listen 8080
NameVirtualHost *:8080
<VirtualHost *:8080>
ServerName redmine.sweets.localhost
DocumentRoot "/home/redmine/public"
<Directory />
Options Indexed FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
日本語の表示環境があらかじめ組まれているため、簡単な設定ですぐに日本語で使ってみることも可能です。Web上からプロジェクトもユーザも作成できるのが嬉しいですね。これからちょっといろいろ試してみたいと思います。
- 83 http://www.google.co.jp/search?q=freebsd+redmine&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox
- 72 http://www.google.co.jp/search?hl=ja&client=firefox-a&rls=org.mozilla:ja:official&hs=J8I&q=redmine+必要なもの&btnG=検索&lr=lang_ja
- 68 http://www.google.co.jp/search?q=redmine+FreeBSD&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:ja:unofficial&client=firefox-a
- 64 http://www.google.co.jp/search?q=FreeBSD+Redmine&lr=lang_ja&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:ja-JP-mac:official&client=firefox
- 60 http://www.google.co.jp/search?q=redmine+freebsd&lr=lang_ja&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:ja:official&client=firefox
- 35 http://www.google.co.jp/search?sourceid=navclient&hl=ja&ie=UTF-8&rlz=1T4GGLF_jaJP280JP280&q=redmine+インストール+bsd
- 33 http://www.google.co.jp/url?sa=t&rct=j&q=freebsd redmine&source=web&cd=1&ved=0CCQQFjAA&url=http://d.hatena.ne.jp/unam-h/20080501/1209642442&ei=712ETtOzFebPmAXRheT1Dw&usg=AFQjCNF03_7M9h9YQNf5r20daHlJwMsBwg&cad=rja
- 32 http://www.google.co.jp/search?sourceid=chrome&ie=UTF-8&q=freebsd+redmine
- 26 http://www.google.co.jp/search?sourceid=chrome&ie=UTF-8&q=RedMine+FreeBSD
- 24 http://www.google.co.jp/search?hl=ja&source=hp&q=redmine+FreeBSD&btnG=Google+検索&lr=&aq=f&oq=

