Setting Run Level on SuSe Linux - Adding services

Posted Oct 08, 2006

I just learned how to set the run level today. I used to do it manually, but creating symbolic links to the startup/shutdown script in /etc/init.d. But when I tried it on my newly setup system, I couldn't get it to work. Then I found how to use the chkconfig script. This is on my SuSe 10.0 environment. I read it works on Redhat too.

# chkconfig --list
This will list all services that are started up at boot time and what run level they are at.

# chkconfig --level 345 mysql.server on
This will set the MySQL server to start on run level 3, 4 and 5

# chkconfig mysql.server -list
This will list for an individual service

# chkconfig mysql.server -add
This will add a service and then you need to set the run time level using the --leve switch above

For example. I created this startup for apache, by copying the start up script supplied by apache, into the init.d directory:
#cp /usr/local/apache2/bin/apachectl httpd

# chkconfig httpd --add
httpd                     0:off  1:off  2:off  3:on   4:off  5:on   6:off

# chkconfig httpd on --level 2,3,5

You can then see your newly added service when listing them all or individually, using the commands above.


Comments are currently turned off

Latest Discussions

  • Carlos: Thank you!
    May 16, 2014 | Replies (0)
  • Jessica: Great info, thanks!
    May 15, 2014 | Replies (1)
  • Walter: Thanks, you totally saved me a bunch of searching around just now. I was setting up a percona xtradb...
    Feb 25, 2014 | Replies (0)
  • Avi: I've found the reason of the problem in my case. It's a bug as described here :
    Dec 12, 2013 | Replies (0)
  • Avi: I've also met that behavior twice on 5.6.12 slaves. However, i didn't find the root cause of that....
    Dec 12, 2013 | Replies (0)