Skip to content

Instantly share code, notes, and snippets.

@stephen-mw
Last active December 31, 2015 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephen-mw/8032461 to your computer and use it in GitHub Desktop.
Save stephen-mw/8032461 to your computer and use it in GitHub Desktop.
Debian/Ubuntu collectd compiling and installation script
#!/bin/bash
set -e
#
# Collectd automatic compile and installation script
# for debian systems
#
# Stephen Wood
# www.heystephenwood.com
#
apt-get install -y build-essential
pushd /tmp
wget http://collectd.org/files/collectd-5.4.0.tar.bz2
tar xvf collectd-5.4.0.tar.bz2
pushd collectd-5.4.0
./configure
make all install
# The Upstart script works but includes a reference to an old location
# for the binary. We'll update it after copying it.
cp contrib/upstart.collectd.conf /etc/init/collectd.conf
sed -i 's#/usr/sbin/collectd#/opt/collectd/sbin/collectd#' /etc/init/collectd.conf
service collectd start
popd
rm -rf collectd-5.4.0*
echo "Collectd successfully installed and running"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment