Monday, September 20, 2010

Adding services to Linux startup on boot

Many times, when installing a program or service on a Linux distribution, the installers do not take care of the process of creating the proper links/files to autostart the service upon reboot.

For my own reference, here it is:

This procedure is different for Ubuntu vs. CentOS.

Ubuntu
CentOS
  • chkconfig serviceNameIn/etc/init.d on
  • You may have to edit the init.d script by finding the line that reads:
  • # chkconfig: - 64 36 ( for example ) and make sure the - is replaced by the runlevels you want it running in, i.e. 2345
  • Here is a man page