Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to run the command below on CentOS and of course I get command not found:

$ update-rc.d redis_6379 defaults

How do I then perform the equivalent using chkconfig?

share|improve this question
    
update-rc.d doesn't not exist on Red Hat distros such as Fedora/CentOS/etc. The equivalent would be to use chkconfig, eg. chkconfig redis_6379 on or chkconfig --level 345 redis_6379 on. –  slm Nov 11 at 3:10

1 Answer 1

It is important to understand what the command does in order to use the equivalent on a different system. Here is the description of "defaults" in the update-rc.d manpage:

   If  defaults is used then update-rc.d will make links to start the ser
   vice in runlevels 2345 and to stop the service in  runlevels  016.

In order to replicate this in chkconfig, two commands are needed:

chkconfig redis_6379 on

By default, chkconfig assumes levels 2345. Any runlevels not specified as on, will be marked as off. This will be levels 016.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.