mysqlのインストールは他のページに任せます。
redmineのインストールは基本的に、ここを参照
⇒ http://redmine.jp/guide/RedmineInstall/
■redmine のインストール
http://www.redmine.jp/download/
redmineのインストールは、落として、展開するだけ。
適当な場所へフォルダごと設置してください。
C:\redmine-1.3.2 等。
■MYSQL インストール後からの設定方法
空のデータベースとそのデータベースに接続するためのユーザー(例: redmine )を作成。
MySQLの場合:
mysql> create database redmine character set utf8;
Query OK, 1 row affected (0.01 sec)
mysql> create user ‘redmine’@'localhost’ identified by ‘my_password’;
Query OK, 0 rows affected (0.09 sec)
mysql> grant all privileges on redmine.* to ‘redmine’@'localhost’;
Query OK, 0 rows affected (0.02 sec)
■redmineフォルダ内の、config/database.example.yml をコピーして config/database.yml を作成。
config/database.yml を編集し、”production”環境用のデータベース設定を行う。
MySQLの場合:
production:
adapter: mysql
database: redmine
host: localhost
username: redmine
password: my_password
encoding: utf8
※今回、他は削除
■ libmysql.dll を、ruby/binディレクトリにコピー
下記からダウンロード
http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll
■RubyGemsのダウングレード
このまま進めていくと
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
なるエラーが大量発生
rubyの中の、RubyGemsが新しすぎるみたい。というわけで、RubyGemsのダウングレードが必要。
◎バージョンの確認
c:\>gem -v
1.8.16
◎ダウングレード
c:\>gem update –system 1.6.2
Updating rubygems-update
Fetching: rubygems-update-1.6.2.gem (100%)
Successfully installed rubygems-update-1.6.2
Installing RubyGems 1.6.2
RubyGems 1.6.2 installed
・ソ=== 1.6.2 / 2011-03-08
Bug Fixes:
* require of an activated gem could cause activation conflicts. Fixes
Bug #29056 by Dave Verwer.
* `gem outdated` now works with up-to-date prerelease gems.
——————————————————————————
RubyGems installed the following executables:
C:/Ruby187/bin/gem
RubyGems system software updated
◎バージョンの確認
c:\>gem -v
1.6.2
■ MySQLのC bindingをインストール。
gem install mysql を実行すればインストールできます。
これをしないと、
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.rake aborted!
のエラーが発生。説明には、速度が上がるだけで、しなくても良さそうな書き方だが。。
うまくいかない人は、ここ参照?
http://d.hatena.ne.jp/tohtas/20081207/1228668226
■セッションストア秘密鍵を生成。
c:\redmine-1.3.2>rake config/initializers/session_store.rb
■データベース上にテーブルを作成
c:\redmine-1.3.2>set RAILS_ENV=production
c:\redmine-1.3.2>rake db:migrate
c:\redmine-1.3.2>rake redmine:load_default_data
最後のコマンドを打ったとき、言語を聞いてくるので、ja と入力。
※rake db:migrate で、はじめの方で作成したredmineのDBへテーブルが作成される。
■redmineの起動
c:\redmine-1.3.2>ruby script/server webrick -e production
で、webrickを起動した後に、ブラウザで、http://localhost:3000/ へアクセスすれば起動!
最初の管理者のユーザー名とパスワードは
ユーザー名:admin
パスワード:admin
です!とりあえず、おつかれさまでした。