I installed and started a redmine server on a linux machine, following the instructions at http://www.redmine.org/projects/redmine/wiki/RedmineInstall and was wondering how I start the server in a way so that it won't stop when I log out of the ssh session.
4 Answers
There are two possible ways. The easiest way is to install a screen
program and to run webrick in your screen session. Screen sessions are persistent, so you will be able to detach from the screen session and disconnect. This way is not optimal because webrick serve requests serially, so the performance is not too high. Second way is to install Apache and Phusion Passenger and to deploy Redmine on Passenger. This requires some amount of work. I can't find a Howto I used for that, but some details can be found here, probably you will need to adapt this Howto to your distro.

- 7,939
- 6
- 38
- 52
-
I did exactly this not to long ago. Even worked, eventually. – David Mackintosh Feb 11 '11 at 03:14
-
Very cool. Thanks for the answer. Now how do I install redmine on apache on phusion passenger? – lowerkey Feb 11 '11 at 07:00
You should never ever use script/server
for production deployments. Use it only for testing and development. There are special application server (like Passenger which are suitable for actual deployments.
There are various HowTos on Google. But generally, Redmine deployments follow the default path documented in Passenger's own documentation.

- 3,325
- 1
- 17
- 23
you mean when you run this command?
ruby script/server webrick -e production
You can stick an ampersand '&' on the end of any command so that I'll background the process. i.e
ruby script/server webrick -e production &
for more information on backgrounding tasks, its worthwhile reading something like this.
As the documentation you've pointed to suggests you shouldn't be running with the webrick server for production. You should look at installing redmine with apache.

- 10,796
- 7
- 37
- 47
-
That runs the process in the background, but it will still exit once my connection is closed, right? – lowerkey Feb 11 '11 at 06:58
-
nohup is what you use when you want to prevent it from die when exiting the shell.
I do agree with others that running the scripts like that might not be optimal.

- 4,330
- 5
- 32
- 46