Last active
March 7, 2020 16:02
-
-
Save alekc/dcbf3a6e0d76560023fb08a6aa58d02c to your computer and use it in GitHub Desktop.
Install firehol and netdata.
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 | |
# You can also run this script with 1 line | |
# curl https://gist.githubusercontent.com/alekc/dcbf3a6e0d76560023fb08a6aa58d02c/raw/install-firehol-netdata.sh | bash | |
LC_ALL=C | |
# you need to install a basic build environment | |
# this is for ubuntu, change it according to your needs for other systems | |
apt-get update && apt-get install -y zlib1g-dev uuid-dev libmnl-dev gcc make git autoconf autogen automake pkg-config traceroute ipset curl nodejs zip unzip jq ulogd2 autoconf-archive || exit 1 | |
for x in iprange firehol netdata | |
do | |
if [ ! -d /usr/src/${x}.git ] | |
then | |
echo "Downloading (git clone) ${x}..." | |
git clone https://github.com/firehol/${x}.git /usr/src/${x}.git || exit 1 | |
else | |
echo "Downloading (git pull) ${x}..." | |
cd /usr/src/${x}.git || exit 1 | |
git pull || exit 1 | |
fi | |
done | |
echo | |
echo "Building iprange..." | |
cd /usr/src/iprange.git || exit 1 | |
./autogen.sh || exit 1 | |
./configure --prefix=/usr CFLAGS="-O2" --disable-man || exit 1 | |
make clean | |
make || exit 1 | |
make install || exit 1 | |
echo | |
echo "Building firehol..." | |
cd /usr/src/firehol.git || exit 1 | |
./autogen.sh || exit 1 | |
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-man --disable-doc || exit 1 | |
make clean | |
make || exit 1 | |
make install || exit 1 | |
echo | |
echo "Building netdata..." | |
cd /usr/src/netdata.git || exit 1 | |
./netdata-installer.sh --dont-wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment