Home » Linux OS and Software » How-To » How do i keep programs running after disconnecting from the vps?
Fri, 07 January 2011 00:06 Go to next message
Registered: January 2011
Messages: 5
yah 1 more question from a newbie, i recently set up my server, got everything i wanted installed and got the server hosting what i wanted it to, but now ive run into a problem, i start up the hosting program via putty but as soon as i close putty the hosting program stops, how can i remedy this? i googled it already and found a bunch of posts saying that making it run in the background by adding an & at the end of the command will allow it to keep running, i then used the job command to make sure it runs in the background, it does, but yet when i disconnect it still shuts down the program, so once again i turn to the forums...

oh and im using fedora 13 if that helps...



[Updated on: Fri, 07 January 2011 00:07]

Fri, 07 January 2011 06:41 Go to previous messageGo to next message
Registered: January 2009
Messages: 62
For a simple command line app you can use the nohup (No hangup) command line prefix.

I would suggest that you familiarize yourself with the rc startup script scheme and create one customized for your server app.

Take a look in /etc/init.d/README and /etc/init.d/skeleton.

Don't forget to make the script executable with 'chmod 755 your-script'.

Also, you must assign it to runlevels.

Take a look at 'man update-rc.d'.

Hope this helps.

Fri, 07 January 2011 16:28 Go to previous messageGo to next message
Registered: January 2011
Messages: 5
thanks again xenolith, nohup worked perfectly
Sat, 08 January 2011 01:28 Go to previous message
Registered: November 2007
Messages: 511
Another option is to use 'screen'. It allows you to have multiple shells and to keep them running while you disconnect. You can also reconnect to them later on.

Previous Topic:Running Java on low-memory environments
Next Topic:Upgrading the Gentoo Minimal Profile
Goto Forum:

Current Time: Wed Feb 26 08:36:16 EST 2020
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2006 FUD Forum Bulletin Board Software