Torrus Wiki
Brought to you by:
ssinyagin
SDBS is a package maintained by Tobias Oetiker, and it allows to compile easily all pre-requisites for Torrus. This way, you are completely independent from software versions that are coming with your OS.
The following script documents the installation steps for Debian 8.
RHEL or CentOS needs a bit different package names.
apt-get update && apt-get install -y git gcc g++ make automake \
libtool apache2 libapache2-mod-fcgid pkg-config xz-utils bzip2
mkdir -p /opt/pm/src
cd /opt/pm/src
git clone https://github.com/oetiker/sdbs.git
cd sdbs
PREFIX=/opt/pm/thirdparty ./build_perl-5.24.sh
PREFIX=/opt/pm/thirdparty ./build_rrdtool-1.6.0.sh
PREFIX=/opt/pm/thirdparty ./build_torrus_deps.sh
cat >/etc/profile.d/torrus_path.sh <<'EOT'
PATH=/opt/pm/thirdparty/bin:/opt/pm/bin:$PATH
export PATH
EOT
logout
#login again
useradd -rU torrus
usermod -aG torrus www-data
cd /opt/pm/src/
git clone https://github.com/ssinyagin/torrus-newfeatures.git
cd torrus-newfeatures/src
autoreconf
./configure --prefix=/opt/pm piddir=/var/torrus/run
make install
cd ../plugins/cbqos/
autoreconf
torrus install_plugin .
mkdir /opt/pm/share/www
cat >/opt/pm/share/www/index.html <<'EOT'
<html>
<head>
<title>redirect page</title>
<META http-equiv="Refresh" CONTENT="0; URL=/torrus/">
</head>
<body></body>
</html>
EOT
cat >/etc/apache2/sites-available/200-torrus.domain.com.conf <<'EOT'
<VirtualHost *:80>
DocumentRoot "/opt/pm/share/www"
ServerName torrus.domain.com
ScriptAlias /torrus "/opt/pm/torrus/bin/torrus.fcgi"
FcgidMaxProcessesPerClass 10
FcgidMaxRequestsPerProcess 100
<Location />
Options Indexes
Require all granted
</Location>
<Location /torrus>
Options +ExecCGI
</Location>
</VirtualHost>
EOT
a2ensite 200-torrus.domain.com
systemctl restart apache2
mkdir -p /srv/torrus/collector_rrd
chown torrus:torrus /srv/torrus/collector_rrd
chmod g+s /srv/torrus/collector_rrd
cp /opt/pm/src/torrus-newfeatures/src/init.d/torrus /etc/init.d/
# configure Torrus, compile the trees, then enable the startup
systemctl enable torrus
systemctl start torrus
journalctl -u torrus