HowTo Install Redmine in a sub-URI on Windows with Apache » History » Revision 1
Revision 1/13
| Next »
Jack Kurzecki, 2009-12-14 09:24
Complete installation walkthrough - Zero-to-Redmine on Windows with Apache
HowTo Install Redmine in a sub-URI on Windows with Apache¶
- Table of contents
- HowTo Install Redmine in a sub-URI on Windows with Apache
Following the steps below exactly as listed will produce a working Redmine 0.8.7 installation hosted under http://localhost/redmine sub-URI on Windows XP/2003 x86/x64 with Apache HTTP Server 2.2.x, MySQL 5.1.x and Ruby 1.8.7. I was also able to get Redmine revision 3171 working by updating rails to version 2.3.4. It took a lot of time to find all the pieces of information and put them together, so I hope this will especially help Windows users. Addtional tasks after this walkthrough could include: HowTo configure Redmine for advanced Subversion integration.
Install Apache HTTP server 2.2.x¶
- Download "Win32 Binary" with or without crypto (depending if you need SSL) from here
- Install to C:\webserver\apache
Install MySQL 5.1.x¶
- Download "Windows Essentials (x86)" from here
- Install to C:\webserver\MySQL
- (optional:) Set data files installation directory to C:\webserver\MySQLData
Install MySQL GUI Tools for MySQL 5.0¶
- Download "Windows (x86) Installer" from here
- Install to C:\webserver\MySQL_GUI_Tools
Install Ruby 1.8.7¶
- At the time of writting this document the latest version of Ruby was 1.9.1 which does NOT work with Redmine
- Use Ruby version 1.8.7 only.
- Since there is no installer package for 1.8.7, we will first install 1.8.6 then copy 1.8.7 binaries on top of it.
- Download "RubyInstaller 1.8.6.rc1" from here
- Install to C:\webserver\ruby
- Open command window, then execue:
mkdir C:\webserver\railsapps cd C:\webserver\railsapps gem list gem uninstall rails gem uninstall actionmailer gem uninstall actionpack gem uninstall activerecord gem uninstall activeresource gem uninstall activesupport
- Download "Ruby 1.8.7-p72 Binary" from here
- extract to C:\webserver\ruby overwritting the 1.8.6 version
- add "C:\webserver\ruby\bin" to your PATH environment variable if not already included
- Download the zlib package from here
- extract the zlib1.dll
- rename it to zlib.dll
- move it to C:\webserver\ruby\bin
- Download the iconv package from here
- extract iconv.dll
- move it to C:\webserver\ruby\bin
- Verify Ruby version
- in command window, execute:
ruby -v
- expected output:
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-mswin32]
- expected output:
- in command window, execute:
Install RubyGems¶
- At the time of writting this document the latest version of RubyGems was 1.3.5. Newer versions should work too.
- Download "rubygems-1.3.5.zip" from here
- extract the package to C:\webserver\railsapps
- in command window, execute:
cd C:\webserver\railsapps\rubygems-1.3.5 ruby setup.rb
- expected output:
RubyGems 1.3.5 installed
- expected output:
- in command window, execute:
cd .. gem update --system
Additional gems¶
mongrel-service and win32-service gems have to be downloaded manually. Download locations are added to sections below.
Install Rake¶
- At the time of writting this document the latest version of Rake was 0.8.7. Newer versions should work too.
- in command window, execute:
gem install rake
- expected output:
Successfully installed rake-0.8.7
- expected output:
Install Rails¶
- At the time of writting this document the latest version of Rails was 2.3.5 which does NOT work with Redmine
- Use Rails version 2.1.2 for Redmine 0.8.7 deployment.
- Use Rails version 2.3.4 for Redmine revision 2887+ deployment.
- Procedure below assumes we will be installing Redmine 0.8.7
- in command window, execute:
gem install rails -v=2.1.2
- expected output:
Successfully installed activesupport-2.1.2 Successfully installed activerecord-2.1.2 Successfully installed actionpack-2.1.2 Successfully installed actionmailer-2.1.2 Successfully installed activeresource-2.1.2 Successfully installed rails-2.1.2
- expected output:
Install Mongrel¶
- At the time of writting this document the latest version of Mongrel was 1.1.5. Newer versions should work too.
- _Project page_
- in command window, execute:
gem install mongrel
- expected output:
Successfully installed gem_plugin-0.2.3 Successfully installed cgi_multipart_eof_fix-2.5.0 Successfully installed mongrel-1.1.5-x86-mswin32-60
- expected output:
Install mysql gem¶
- At the time of writting this document the latest version of mysql gem was 2.8.1. Newer versions should work too.
- It drastically improves page generation speed.
- in command window, execute:
gem install mysql
- expected output:
Successfully installed mysql-2.8.1
- expected output:
Install mongrel-service + win32-service gems¶
- At the time of writting this document the latest version of win32-service was 0.7 which does NOT work with Ruby 1.8.7
- Use win32-service version 0.5.2 for Redmine 0.8.7 deployment.
- Download mongrel-service 0.3.4 (project page)
- Move mongrel_service-0.3.4-i386-mswin32.gem to C:\webserver\railsapps
- Download win32-service 0.5.2 from HERE
- Move win32-service-0.5.2-mswin32.gem to C:\webserver\railsapps
- Install the gem
- in command window, execute:
cd C:\webserver\railsapps gem install mongrel_service
- expected output:
Successfully installed gem win32-service-0.5.2-mswin32 Successfully installed gem mongrel_service-0.3.4-i386-mswin32
- expected output:
- in command window, execute:
Install Redmine¶
- Procedure below assumes we will be installing Redmine 0.8.7, but it also works with revision 3171+
- Download "Redmine" from here
- Extract the archive to C:\webserver\railsapps\redmine
- Log into MySQL using GUI Tools as "root"
- Open a new script tab and execute the following script:
create database redmine character set utf8; create user 'redmine'@'localhost' identified by 'my_password'; grant all privileges on redmine.* to 'redmine'@'localhost';
- Open a new script tab and execute the following script:
- Copy C:\webserver\railsapps\redmine\config\database.yml.example to C:\webserver\railsapps\redmine\config\database.yml
- Edit "config\database.yml" file in order to configure your database settings for "production" environment.
- set hostname, username and password to the velues entered in the SQL script above.
- save and close the file.
- Create default tables and populate with data
- in command window, execute:
cd redmine rake config\initializers\session_store.rb set RAILS_ENV=production rake db:migrate rake redmine:load_default_data
- in command window, execute:
- Procedure below assumes we will be hosting Redmine under http://localhost/redmine:
- Edit "config\environment.rb" file in order to configure Redmine to work as a sub-URI (Apache configuration listed below).
- add the following line at the bottom of the file:
Redmine::Utils::relative_url_root = "/redmine"
- save and close the file.
- add the following line at the bottom of the file:
Setup windows services¶
- Create windows services
- in command window, execute:
mongrel_rails service::install -N mongrel_redmine_3001 -D "Mongrel serving Redmine on 3001" -p 3001 -e production -c C:\webserver\railsapps\redmine mongrel_rails service::install -N mongrel_redmine_3002 -D "Mongrel serving Redmine on 3002" -p 3002 -e production -c C:\webserver\railsapps\redmine mongrel_rails service::install -N mongrel_redmine_3003 -D "Mongrel serving Redmine on 3003" -p 3003 -e production -c C:\webserver\railsapps\redmine
- in command window, execute:
- Start windows services, which in turn will start mongrel servers
- in command window, execute:
net start mongrel_redmine_3001 net start mongrel_redmine_3002 net start mongrel_redmine_3003
- in command window, execute:
- Go to the Windows Services list and set all "Mongrel serving Redmine on 300#" services to start automatically
- in command window, execute:
services.msc /s
- in command window, execute:
Configure Apache 2.2.x as proxy to Mongrel cluster¶
- Procedure below assumes we will be hosting Redmine under http://localhost/redmine:
- Open C:\webserver\apache\conf\httpd.conf
- At the bottom of this file add the following line:
Include conf/httpd-proxy-mongrel.conf
- Create a file C:\webserver\apache\conf\httpd-proxy-mongrel.conf
- Enter the following:
LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_balancer_module modules/mod_proxy_balancer.so ProxyPass /redmine balancer://it_cluster ProxyPassReverse /redmine balancer://it_cluster <Proxy balancer://it_cluster> BalancerMember http://127.0.0.1:3001 BalancerMember http://127.0.0.1:3002 BalancerMember http://127.0.0.1:3003 </Proxy>
- Restart the apache service.
DONE!
Apendix¶
- Check if you have all the necessary gems installed for Redmine 0.8.7
- in command window, execute:
gem list
- expected output:
actionmailer (2.1.2) actionpack (2.1.2) activerecord (2.1.2) activeresource (2.1.2) activesupport (2.1.2) cgi_multipart_eof_fix (2.5.0) gem_plugin (0.2.3) mongrel (1.1.5) mongrel_service (0.3.4) mysql (2.8.1) rails (2.1.2) rake (0.8.7) win32-service (0.5.2)
- expected output:
- in command window, execute:
- Check if you have all the necessary gems installed for Redmine revision 2887+
- in command window, execute:
gem list
- expected output:
actionmailer (2.3.4) actionpack (2.3.4) activerecord (2.3.4) activeresource (2.3.4) activesupport (2.3.4) cgi_multipart_eof_fix (2.5.0) gem_plugin (0.2.3) mongrel (1.1.5) mongrel_service (0.3.4) mysql (2.8.1) rack (1.0.1) rails (2.3.4) rake (0.8.7) win32-service (0.5.2)
- expected output:
- in command window, execute:
Updated by Jack Kurzecki about 15 years ago · 1 revisions