Wednesday, March 10, 2010

How to start service in LINUX on startup

To start a service in Linux on startup there are two methods.

i) if it is standard service and has a script in /etc/init.d just check its status

chkconfig --list service name

if is off

make it on by the following commands

chkconfig service name on

Similarly you can make a service off by following command

chkconfig service name off

other way write a script put it in /etc/init.d

add run following command

chkconfig --add service name
chkconfig service name on

simlarly you can remove a service for the list

chkconfig --del service name

ii) put the startup code in rc.local file.

No comments:

Post a Comment