Oct 26, 2018

How to auto start services on boot on Centos / Redhat

To auto start a new service:
Find out the name of service's script from /etc/init.d/ directory e.g. mysql or httpd
Add it to chkconfig


sudo /sbin/chkconfig –add mysql
Make sure it is in the chkconfig.

sudo /sbin/chkconfig –list mysql
Set it to autostart

sudo /sbin/chkconfig mysqld on

To stop a service from auto starting on boot

sudo /sbin/chkconfig mysqld off