Hello,
how wow do I let a service start at boot on CentOS.
some start automatically, but some not.
thanks
Solved: How do I let a service start at boot on CentOS
Solved: How do I let a service start at boot on CentOS
Last edited by mister_v on Wed Mar 21, 2012 11:31 am, edited 1 time in total.
Re: How do I let a service start at boot on CentOS
You can do this with the builtin chkconfig utility:
This command show you all the services and their status on each runlevel.
If you don't see your service in it (mysqld for example?), you can add it.
You also need to set it to ON, in the desired runlevel.
For servers this is mostly runlevel 3.
Now it should start when the system is rebooted.
For the record the runlevels:
0 - Halt
1 - Single-user text mode
2 - Not used (user-definable)
3 - Full multi-user text mode
4 - Not used (user-definable)
5 - Full multi-user graphical mode (with an X-based login screen)
6 - Reboot
Code: Select all
sudo /sbin/chkconfig --list
If you don't see your service in it (mysqld for example?), you can add it.
Code: Select all
sudo /sbin/chkconfig --add mysqld
For servers this is mostly runlevel 3.
Code: Select all
sudo /sbin/chkconfig --level 3 mysqld on
For the record the runlevels:
0 - Halt
1 - Single-user text mode
2 - Not used (user-definable)
3 - Full multi-user text mode
4 - Not used (user-definable)
5 - Full multi-user graphical mode (with an X-based login screen)
6 - Reboot
Re: How do I let a service start at boot on CentOS
Thanks, just what I needed.