How one can make some linux service like mysql, apache start automatically on server reboot?
There are several ways, here is Mysqld service example:
will just add the service:
will add + enable service to autostart (make the service enabled on levels 2345 - default & working config on my linux) that is what we needchkconfig --add mysqld
It can be done also manually entering levels, but why? :chkconfig mysqld on
After the command, try to run following command to ensure service was added/enabled (on):chkconfig --level 2345 mysqld on
The result - enabled mysqld autostart should be:chkconfig --list mysqld
chkconfig --list mysqld
mysqld 0 off 1 off 2 on 3 on 4 on 5 on 6 off
On Debian/Ubuntu
At Debian based os, mysql should be able to launch using: update-rc.d mysqld defaults ?
Bookmarks