Last active
December 31, 2015 19:19
-
-
Save stephen-mw/8032461 to your computer and use it in GitHub Desktop.
Debian/Ubuntu collectd compiling and installation script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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