redmine installation
My redmine setup log on Server 2008 SP2 x64 Web Edition, IIS7, native FastCGI and Microsoft URL Rewrite
Base on 2 best article I found by googling
- IIS 7.0 Server-Side 10 steps to get Ruby on Rails running on Windows with IIS FastCGI
http://mvolo.com/blogs/serverside/archive/2007/02/18/10-steps-to-get-Ruby-on-Rails-running-on-Windows-with-IIS-FastCGI.aspx - Ruby on Rails in IIS 7.0 with URL Rewriter RuslanY Blog
http://ruslany.net/2008/08/ruby-on-rails-in-iis-70-with-url-rewriter/
with something I found may be useful.
First of all – prepare files
- ruby One-Click Installer (1.8.6-27)
ruby186-27_rc2.exe
http://rubyforge.org/frs/?group_id=167&release_id=41267 - Microsoft URL Rewrite Module 1.1 for IIS 7 (x64)
rewrite_1.1_amd64_en-US.msi
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=d05111c1-b4f7-45f3-8f60-a8f2b9d49ed1 - Redmine 0.8.7 ( 2009-11-15)
redmine-0.8.7.zip
http://rubyforge.org/frs/?group_id=1850 - RubyForIIS
RubyForIIS-0.1.exe
http://avhelp.ucc.usyd.edu.au/james/RubyForIIS-0.1.exe
Then – Install files
Step 1: Install Ruby 1.8.6.
According to Redmine Installation Guide ( http://www.redmine.org/wiki/redmine/RedmineInstall ), Support Ruby version is 1.8.6. & 1.8.7.
Step 2: Install rails
gem install rails
Step 3: Install RubyForIIS
Because the fcgi extension not bundle in rails.
Afterward, test fcgi
c:\ruby\bin\>irb irb(main):001:0> require 'fcgi' => true irb(main):002:0> quit
Step 4: Extract Redmine files to target folder
e.g. C:\inetpub\redmine
below I will call it [Redmine Path]
Step 5: Create folder and Set folder permission (Step 7 on Redmine Installation Guide)
make a folder called \tmp and \public\plugin_assets under [Redmine Path]
cd [Redmine Path] md tmp md public\plugin_assets
and assign tmp, files, log, public\plugin_assets IWAM account ( or Network Service account) has full control
Step 6: Create Database
Just create database, user account and password (Step 3 on Redmine Installation Guide).
make sure the default database character is “utf-8” because the create database script did not assign.
Step 7: Config files
copy [Redmine Path]\config\database.y ml.example to [Redmine Path]\config\database. yml and edit the “production” database connection settings
Step 8: run database create script on redmine root folder
rake db:migrate RAILS_ENV=”production” and create session store
cd [Redmine Path] rake config/initializers/session_store.rb
Step 9: test site by using build-in webrick (step 8 on Redmine Installation Guide).
ruby script/server webrick -e production
Step 10:IIS config
Create a web site and set physical path to redmine public folder
Copy/rename [Redmine Path]\public\dispatch.fcgi.example to [Redmine Path]\public\dispatch.fcgi
Modify [Redmine Path]\config\environment.rb, uncomment line "# ENV['RAILS_ENV'] ||= 'production'" to assign the environment to production
Copy/rename [Redmine Path]\config\email.yml.example to [Redmine Path]\config\email.yml and setup Outgoing email settings
Module Setting
URL Mapping
Request path: dispatch.fcgi
Module: FastCgiModule
Executable (optional):
c:\Ruby\bin\Ruby.exe|[Redmine Path]\public\dispatch.fcgi production
Step 11:URL Rewrite
paste following url rewrite config into web.config under <system.webServer> branch
<rewrite> <rules> <clear /> <rule name="Imported Rule 1-1" stopProcessing="true"> <match url="^(.*)(\.png)(\.)$" ignoreCase="true" /> <conditions logicalGrouping="MatchAll" /> <action type="Rewrite" url="{R:1}.png" appendQueryString="false" /> </rule> <rule name="Imported Rule 1"> <match url="^$" ignoreCase="false" /> <action type="Rewrite" url="index.html" appendQueryString="true" /> </rule> <rule name="Imported Rule 2"> <match url="^([^.]+)$" ignoreCase="false" /> <action type="Rewrite" url="{R:1}.html" appendQueryString="true" /> </rule> <rule name="Imported Rule 3" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" /> </conditions> <action type="Rewrite" url="dispatch.fcgi" appendQueryString="true" /> </rule> </rules> </rewrite>
Step 12:Minor configuration
[Redmine Path]\config\environment.rb
uncomment following line to force rails environment to production
ENV['RAILS_ENV'] ||= 'production'