How to add a service on Linux using chkconfig

Add a service to  auto start in linux

  1. Add the below #comment lines on top of the script which always located /etc/init.d/
  2. #chkconfig: 2345 20 80
  3. #description: Saves and restores system \

2,3,4,5 are starting levels
20 startup priority
80 stop priority
\ causes the line to be continued

Finally add services to  “autostart”

  1. chkconfig –add service1
  2. chkconfig –add service2
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s