HOWTO: Redmine as Windows Server 2003 Service
Added by Jordan Metzmeier almost 16 years ago
First, download the Windows NT Resource Kit: http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en and install it.
It should be noted that this is not added to your PATH so you will always need to specify absolute paths when running these commands. To add the registry entry for redmine we do:
path\INSTSRV.EXE My Service path\SRVANY.EXE
In my case it looked like this:
"C:\Program Files\Windows NT Resource Kit\INSTSRV.EXE" Redmine "C:\Program Files\Windows NT Resource Kit\SRVANY.EXE"
Then add the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Redmine
Now go to Start -> Run -> regedit. Right click on the registry key and select New -> Key. Name it "Parameters" without the quotes.
Now we need to add two values to the Parameters key. Right click on the parameters key, New -> String Value. Name it "Application". Now create another one named "AppParameters". Give them the following values:
For Application:
C:\ruby\bin\Ruby.exe
For AppParameters:
C:\RUBYAPP\script\server -e production
Where RUBYAPP is the directory that contains the redmine website.
Now you can go to Administrative Tools -> Services. There you can start the Redmine service and test whether or not it is working properly. It should be noted that the service will be marked as started prior to WEBrick finishing its boot procedure. You should give it 1min or so before trying to hit the service to verify that it is working correctly.
I hope this helps someone. Good luck.
Replies (9)
RE: HOWTO: Redmine as Windows Server 2003 Service - Added by John Reynolds almost 16 years ago
I've posted a few articles in here too about running Redmine on Windows, and using InstaRails.
I wonder if they might be open to a more 'official' installation page for us poor Windows people?
RE: HOWTO: Redmine as Windows Server 2003 Service - Added by Chaoqun Zou almost 16 years ago
Hi, John
We are using mongrel and mongrel_service on windows platform now. It's a little easier to config than using srvany and has a better performance than webrick.
RE: HOWTO: Redmine as Windows Server 2003 Service - Added by sebastián scarano over 15 years ago
hi chaoqun...
it would be great if you could post a detailed howto on configuring redmine as a service with mongrel on windows!!!
or at least point us to some web page that could enlighten us...
RE: HOWTO: Redmine as Windows Server 2003 Service - Added by sebastián scarano over 15 years ago
well, just googled around a little bit, and found
http://mongrel.rubyforge.org/wiki/Win32
I gave it a try and it really was that easy indeed...
gem install mongrel
gem install mongrel_service
mongrel_rails service::install -N redmine -c c:\redmine -p 4000 -e production
that's it
you can also
mongrel_rails service::install -N redmine_dev -c c:\redmine -p 4000 -e development
to create a service for running it on development...
you can also configure the service to autostart
sc config myapp start= auto
and define it's dependencies
sc config myapp start= auto dependency= MySql
anyway, taking into account that mongrel seems to have been abandoned, I'll take a look at
http://code.macournoyer.com/thin/
saludos
sas
RE: HOWTO: Redmine as Windows Server 2003 Service - Added by sebastián scarano over 15 years ago
Following Jordan's intrsuctions, I documented the whole process in
works with webrick, mongrel and thin...
RE: HOWTO: Redmine as Windows Server 2003 Service - Added by Eric Lightman about 15 years ago
Thanks, Jordan. Overall, I was able to figure this out, but these instructions are slightly off. Here is my updated version, which should work verbatim (tested on Window XP):
1. Download the Windows NT Resource Kit: http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en and install it. (Note: according to Microsoft, this is compatible with Server 2003 and XP.)
2. Add the new Redmine service using the new resource kit command:
[resource kit install path]\INSTSRV.EXE Redmine [resource kit install path]\SRVANY.EXE
For example:
"C:\Program Files\Windows NT Resource Kit\INSTSRV.EXE" Redmine "C:\Program Files\Windows NT Resource Kit\SRVANY.EXE"
3. Run regedit. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Redmine (which was created by the previous step). Right-click this key, and select New->Key; name it "Parameters".
4. Right-click on the new Parameters key and select New->String Value. Name it "Application". Repeat this step and create another new string value called "AppParameters".
5. For the Application string value, give it the following value (assuming this is your Ruby install directory):
c:\Ruby\bin\ruby.exe
For the AppParameters string value, give it the following value (assuming this is your Redmine install directory):
c:\redmine\script/server webrick -e production
6. Run services.msc (or navigate to Services from Administrative Tools). The Redmine service will now be listed. Start it, and wait a minute for the server to boot up. Test in your web browser to ensure it is working properly.
Hope this clears some things up and is useful to others. Thanks everyone for your assistance!
Eric
RE: HOWTO: Redmine as Windows Server 2003 Service - Added by Jack Kurzecki about 15 years ago
Another option is to run Redmine in a mongrel cluster using mongrel_service 0.3.4 and win32-service 0.5.2 gems, which have to be downloaded manually.
I put this page together after a long struggle: HowTo Install Redmine in a sub-URI on Windows with Apache
Tested with Redmine 0.8.7 and Redmine r3171
RE: HOWTO: Redmine as Windows Server 2003 Service - Added by Brad Rushworth about 15 years ago
Jack Kurzecki wrote:
Another option is to run Redmine in a mongrel cluster using mongrel_service 0.3.4 and win32-service 0.5.2 gems, which have to be downloaded manually.
I put this page together after a long struggle: HowTo Install Redmine in a sub-URI on Windows with Apache
Tested with Redmine 0.8.7 and Redmine r3171
By complete coincidence, I also setup Redmine with a Mongrel cluster today exactly as described above. I originally wanted to use mod_fcgid on Windows 2003 but found out the hard way that it can't be done (it works fine on Linux however).
Anyway, I read the instructions provided on this wiki page and can vouch for its accuracy. Thanks for documenting the whole process in such a straightforward manner.
The only alteration I would make is:
Edit "config\environment.rb" file in order to configure Redmine to work as a sub-URI (Apache configuration listed below).
I didn't need to do this. Instead you can specify the /redmine as an option to the mongrel_rails service::install
command. I think the option is called --path=
from memory. This is probably better practise.
RE: HOWTO: Redmine as Windows Server 2003 Service - Added by Jack Kurzecki about 15 years ago
Brad Rushworth wrote:
(...)
The only alteration I would make is:
Edit "configenvironment.rb" file in order to configure Redmine to work as a sub-URI (Apache configuration listed below).
I didn't need to do this. Instead you can specify the /redmine as an option to the
mongrel_rails service::install
command. I think the option is called--path=
from memory. This is probably better practise.
When installing Redmine 0.8.7 on Rails 2.1.2 the following worked:
mongrel_rails service::install -N mongrel_redmine_3001 -D "Mongrel serving Redmine on 3001" -p 3001 -e production -c C:\webserver\railsapps\redmine --prefix=/redmine
However that no longer worked with Rails 2.3.4 when tested with Redmine revision r3171
The preferred way is to edit "config\environment.rb" and it work with future versions.
I went through a lot of frustration figuring this one out... that's one of the reasons why I put all the details on that Wiki page.
Redmine is an excellent tool and I hope it gets more attention from Windows users.
My hat goes off to Jean-Philippe and the rest of the developers.