On Debian/Ubuntu:
sudo apt-get update
sudo apt-get install monit
On Red Hat/CentOS:
sudo yum install monit
After installation, you can start Monit and check the status of your monitored services.
Start Monit:
sudo systemctl start monit
Enable Monit to start at boot:
sudo systemctl enable monit
Check the status of Monit:
sudo monit status
Open the web interface (if enabled):
By default, Monit listens on port 2812. You can access it via http://<server-ip>:2812, and you’ll need to configure authentication in the monitrc file.
See Monit Hardening.