BLACK FRIDAY DEALS

Knowledge Base

Allows you to search a variety of questions and answers

Search

Search results

Centos/RedHat

This is true for CentOS/RHEL/FC flavors.

Login as root user and go to /etc/rc.d directory. You will need to edit the rc.local file. There, add your own command line to start the service of your choice.

How can I add a service to run at boot?

This is for RH-based OS only.

You will need to use the chkconfig command. Here, I will use snmpd as the example. 

To add snmpd to the rc0-6.d directory and to have it boot at 2,3,4,5 runlevels, issue the following commands:

chkconfig --level 2345 snmpd on
chkconfig --add snmpd

Debian/Ubuntu

How can I add my own command to run at boot?

07-31-2009, 11:54 AM

If you are on a Debian/Ubuntu system:
 

Code:

update-rc.d <service> defaults

Run above as root and replace <service> with the service you want to run at boot time. ex: httpd, snmpd, etc.

To remove
 

Code:

update-rc.d -f <service> remove

See What Our Customers Say

Leave review
V

Valentine J

Dale, United Kingdom

Great host, have tried many they're certainly a top choice for me. Premium bandwidth, great prices,...

Read full review
J

Jesse C

Great response time and excellent service. I've been with AYK for nearly a year now and I couldn't b...

Read full review
M

Miles S

WA, United States

I had never heard of AYK Solutions before, but they had an awesome deal I couldn't pass up on WHT....

Read full review
T

Treevs

WI, United States

Prompt support, on New Years Eve of all days. Fixed issue within 10 minutes of submitting.

Read full review
ARIN Cisco Supermicro cPanel Intel Microsoft