Centos – Auto-restart services on crash or close


Today I fond that MariaDB is closed on my server (I dont know why) but its not restarted after crash.

I have already added mariadb to start on boot like:

sudo /sbin/chkconfig mariadb on

I want to ask that how to restart the service after it get closed ?
Thanks for help.

Best Answer

You'll want to implement process monitoring using a tool such as monit, god, or bluepill among others.