Windows下Redmine 的安装步骤

本文介绍 WindowsRedmine 的安装步骤。 
1
、给 DOS添加ruby 运行环境(下载并安装 rubyinstaller-1.8.7-p249-rc2.exe
     
 下载地址: http://rubyforge.org/frs/?group_id=167&release_id=42563
(在下载页面中已经找不到 1.8.7-p249了,应该下载rubyinstaller-1.8.7-p302。不要追求最新版本,太高的版本在这里用不了) 
下載了 rubyinstaller-1.8.7-p370 (1).exe 
2
、安装 Redmine所需的运行环境
     
 安装完 rubyinstaller后, 点击开始菜单,选择 Start Command Prompt with Ruby
     
 进入含有 ruby环境的DOS 界面,依次执行如下命令: 
      gem install rake
 (这句改为 gem install -v=0.8.7 rake,如果不指定版本,会下最新的版本回来,但最新的版本用起来会遇到问题 )
      gem install -v=1.0.1 rack
      gem install mysql
  这句我也敲了,但是貌似没起作用,后面还是要下 Mysql的)
      gem install -v=2.3.5 rails

3
、数据库的安装和创建 
     
 下载并安装 MySQL数据库 ,下载地址: http://dev.mysql.com/downloads/mysql/
     
 进入 mysql命令行,执行如下命令: 
      mysql> create database redmine character set utf8;
      mysql> create user 'redmine'@'localhost' identified by 'redmine';
      mysql> grant all privileges on redmine.* to 'redmine' @'localhost';
mysql-5.6.21-win32
4
、下载 Redmine压缩包 (redmine-0.9.3.zip) (要注意下指定的版本)

      下载地址 http://rubyforge.org/frs/?group_id=1850
     
 解压并进入解压后目录的目录,将 config/database.yml.example 重命名为 config/database.yml 
     
 并修改链接数据库所需要的参数,以下是修改信息,加粗部分是修改的内容: 
      production:
        adapter: mysql
        database: redmine
        host: localhost
        username: redmine
        password: redmine
        encoding: utf8
2
redmine-2.6.0
5
、生成 session密钥,执行数据迁移并载入 Redmine默认配置
      set RAILS_ENV=production
      rake config/initializers/session_store.rb
 (这句应改为:rake generate_session_store 
      rake db:migrate
      rake redmine:load_default_data
     
 如果出现以下异常: 
      Mysql::Error: query: not connected: CREATE TABLE 'schema_migrations' ('version varchar(255) NOT NULL) ENGINE=InnoDB
     
 说明需要添加 MySQL的动态链接库文件 libmySQL.dll
         1.
 下载地址 http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll
         2.
 然后后把 libmySQL.dll复制到 Ruby/bin/ 目录下(你安装 rubyinstaller的目录)
libmySQL.dll

1.直接拷贝该文件到系统目录里: 
   1Windows 95/98/Me系统,将libmysql.dll 文件复制到 c:\Windows\System目录下。
   2Windows NT/2000系统,将libmysql.dll 文件复制到 c:\WINNT\System32目录下。
   3Windows XP/WIN7系统,将libmysql.dll 文件复制到 c:\Windows\System32目录下。
2.
然后打开 "开始-运行 -输入regsvr32 libmysql.dll",回车即可解决错误提示!


6
、至此, Redmine安装已经完毕,下面用Redmine自带的 Webrick服务器运行Redmine ,测试是否安装成功 
     
  Redmine的根目录输入命令
       ruby script/server
     
 打开浏览器,输入 http://localhost:3000 如果页面正常显示,则说明已经成功安装。 
      
安装上面的六个步骤安装应该会很顺利的。希望能对你有所收获。  

7.
安装 mongrel
在实际项目中使用 redmine,用redmine 自带的 webrick做为服务器运行redmine很慢,不能满足实际项目管理应用,安装 mongrel,据说比webrick 快很多, ruby DOS环境下输入: 
gem install mongrel

8. mongrel
运行 redmine
 rubyDOS 环境下,切换命令窗口到 redmine目录,输入ruby script/server -e production,浏览器进入 redmine,会发现访问速度很快。 

9.
 放到 Windows服务中
Ruby
提供一个安装 Ruby程序为服务的包:mongrel_service。安装其实很简单,只要命令行下运行 gem
gem install mongrel_service
mongrel_rails service::install -N MongrelRedMineSvc -c E:\Zd\M
管理\0 项目管理 \Redmine\redmine-1.0.0 -p 3001 -e production
sc config MongrelRedMineSvc start= auto depend= MySQL
mongrel_rails service::start -N MongrelRedMineSvc
mongrel_rails service::remove -N MongrelRedMineSvc

10.
 下一步,开始设置 Apache
ServerName myapp.com
ServerAlias www.myapp.com
ProxyPass / http://www.myapp.com:8000/
ProxyPassReverse / http://www.myapp.com:8000
ProxyPreserveHost on
将静态文件的请求留给 Apache来处理,因为它更擅长
ProxyPass /images !
ProxyPass /stylesheets !
#continue with other static files that should be served by apache
Alias /images /path/to/public/images
Alias /stylesheets /path/to/public/stylesheets
#continue with aliases for static content

 

另外附上两个官方的指导地址:

http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_a_sub-URI_on_Windows_with_Apache

http://www.redmine.org/projects/redmine/wiki/RedmineInstall

posted @ 2017-06-26 16:40  不一样的测试  阅读(3888)  评论(0编辑  收藏  举报