Possible Duplicate:How can I close a terminal without killing the command running in it? I'm using Debian for my Server.I just installed MediaCore, which works well.Now I want to have it always started and want to ask, how it'd be possible to start it as a service or in the background.I know how to start but then the shell is useless as long as the program runs.So how can I run it silently, as I run services/daemons?
How to run regular programs as daemons/services
command line;services
You have a couple options.First, you can launch it in screen and then Ctrl-A out of the screen after it launches.  You can later reattach to the screen with a screen -RR {screen number}; you can figure out the screen number with a screen -ls.  (If you only have one active screen a simple screen -RR will reattach).Second, you can launch it from the shell and background it by appending an & after the command.  However, you also want to redirect stdout and stderr to appropriate files so the shell isn't interspersing output of the command with your shell.  I think something like$ command > command.stdout 2> command.stderr &is what you are looking for. I've never used MediaCore so I don't know what it outputs.  If you just want to capture all output to a file whether from stdout or stderr, this will work$ command &> command.output &However, in the long run, since you are using Debian, the right thing to do is add an init script for it (as @user606723 mentioned).  There is a skeleton script in /etc/init.d that would be a good starting point.