搭建Redmine

1.下载Ruby1.87及DevKit,解压,并将两个bin目录加入到PATH
http://rubyinstaller.org/downloads/

2.下载RubyGems 1.3.7,并安装

ruby setup.rb

3.安装gem
1)安装Rails 2.3.14

gem install rails -v=2.3.14 --include-dependencies

2)安装rake

gem install rake --include-dependencies

3)安装rack

gem install rack

4)安装mysql插件

gem install mysql

5)安装rdoc

gem install rdoc

6)安装i18n

gem install i18n

如果网速很差,可以把gem下载到本地后再安装,比如:

gem install i18n -l

4.配置数据库
1)拷贝dll
将mysql安装目录下的libmysql.dll拷贝到ruby路径
如果你的libmysql.dll版本高于5.1.3的话请用这个
http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll

2)配置数据库
下载并解压redmine-1.3.2
拷贝database.yml.example为database.yml,将production小节配置好

3)创建数据库

rake generate_session_store
rake db:migrate RAILS_ENV="production"

5.测试

ruby script/server -e production
#访问http://localhost:3000/
#用户名:admin
#密码:admin

6.配置email
拷贝configuration.yml.example为configuration.yml,
修改smtp配置,重启服务器即可

7.安装服务
1)安装gem

gem install mongrel_service

2)安装服务

mongrel_rails service::install -N Redmine -c D:\Ruby\redmine-1.3.2 -p 3000 -e production

3)设置服务依赖

sc config Redmine depend= MySQL start= auto

4)将mongrel.rb拷贝到redmin/config/initializers
mongrel.rb在github上有很多版本,但要自己改一下代码,来适应自己的rails版本

Leave a Reply

Your email address will not be published. Required fields are marked *

*