Skip to content

Instantly share code, notes, and snippets.

@jessuppi
Last active October 15, 2017 09:27
Show Gist options
  • Save jessuppi/aef48ae760312fc5b13c2a91fc12d099 to your computer and use it in GitHub Desktop.
Save jessuppi/aef48ae760312fc5b13c2a91fc12d099 to your computer and use it in GitHub Desktop.
Install Monit 5.23 (Ubuntu 16.04)
#!/bin/bash
###########################################
#### Install Monit 5.23 (Ubuntu 16.04) ####
###########################################
#### binaries list: https://mmonit.com/monit/dist/binary/
#### downloads: https://bitbucket.org/tildeslash/monit/downloads/
## install outdated repo version ##
DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' /usr/bin/apt-get -q --yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install monit
## upgrade binary ##
/etc/init.d/monit stop
cd /tmp/
wget https://mmonit.com/monit/dist/binary/5.23.0/monit-5.23.0-linux-x64.tar.gz
tar zxvf monit-*
cd monit-*
cp bin/monit /usr/bin/monit
# mkdir /etc/monit
# touch /etc/monit/monitrc
ln -s /etc/monit/monitrc /etc/monitrc
## custom config ##
cd /tmp/
wget --no-cache http://mirrors.littlebizzy.com/monit/monitrc.txt
mv monitrc.txt monitrc
cp -R -f -d --no-preserve=mode,ownership /tmp/monitrc /etc/monit/monitrc
chown root:root /etc/monit/monitrc
chmod 0700 /etc/monit/monitrc
## restart monit ##
/etc/init.d/monit restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment