因爲安裝比較繁瑣,特別RUBY中插件很多版本問題,首先官網尋求教程:http://www.redmine.org/projects/redmine/wiki/HowTos
我是在Windows7中安裝HowTo Install Redmine in a sub-URI on Windows with Apache
按照文章中的提示來;
有可能我們用
gem install rake的時候沒有任何效果,那是因爲我們的網絡被牆了。翻開我前面寫過的一篇文章有介紹怎樣去解決。
在繁瑣的安裝過程中,也許會在這一步,Mysql創建數據庫報錯。至少我用那個教程裏面的方法,
- "Open connection to Start Querying"
- In SQL Query window enter the following script:
create database redmine character set utf8; create user 'redmineUser'@'localhost' identified by 'myPassword'; grant all privileges on redmine.* to 'redmineUser'@'localhost';
執行這段時候確實報錯了。
解決方案:
把mysql安裝目錄裏面的bin添加到系統的環境變量;然後
mysql -u root -p
mysql> CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'newpassword';
mysql> CREATE DATABASE redmine_default CHARACTER SET = 'utf8';
mysql> GRANT ALL PRIVILEGES ON redmine_default.* TO 'redmine'@'localhost';
修改這個環境時候,記得password後面留一個空格;
- Edit C:\webserver\Redmine\config\database.yml file to configure your database settings for "production" environment. It should look like this:
production: adapter: mysql database: redmine host: localhost username: redmineUser password: myPassword encoding: utf8
如果執行這裏提示找不到rakefile,那麼看清楚第一個,要進入項目目錄裏面哦!!
cd C:\webserver\Redmine
- Create (or update) Redmine database tables
- in command window, execute:
cd C:\webserver\Redmine set RAILS_ENV=production rake generate_session_store rake db:migrate
- in command window, execute: