User Tools

Site Tools


vnstat:install:in_ubuntu_with_image_output

Installing vnStat with image output in Ubuntu

Disclaimer

These instructions assume

  1. access to 'root' account or user with admin permissions
  2. use only distribution version specific instructions
  3. some basic Linux skills
  4. commands aren't copypasted blindly
  5. that the process is stopped in case of errors

Ubuntu 15.10 and later

Open a terminal and gain root permissions

sudo -s -H

Verify that root has been gained

whoami

which should reply "root".

Install needed development packages

apt-get update
apt-get install make gcc libc6-dev wget libgd3 libgd-dev libsqlite3-0 libsqlite3-dev

Get the latest release and extract it

cd /usr/src
wget http://humdi.net/vnstat/vnstat-2.10.tar.gz
tar zxvf vnstat-2.10.tar.gz

Compile and install the binaries

cd vnstat-2.10
./configure --prefix=/usr --sysconfdir=/etc && make && make install

Install the service file and start the daemon

cp -v examples/systemd/vnstat.service /etc/systemd/system/
systemctl enable vnstat
systemctl start vnstat

Verify that daemon process got started

pgrep -c vnstatd

which should reply "1". A reply of "0" indicates that the process has failed to start.

Ubuntu 14.04 - 15.04

Open a terminal and gain root permissions

sudo -s -H

Verify that root has been gained

whoami

which should reply "root".

Install needed development packages

apt-get update
apt-get install make gcc libc6-dev wget libgd3 libgd-dev libsqlite3-0 libsqlite3-dev

Get the latest release and extract it

cd /usr/src
wget http://humdi.net/vnstat/vnstat-2.10.tar.gz
tar zxvf vnstat-2.10.tar.gz

Compile and install the binaries

cd vnstat-2.10
./configure --prefix=/usr --sysconfdir=/etc && make && make install

Install the service file and start the daemon

cp -v examples/upstart/vnstat.conf /etc/init/
initctl start vnstat

Verify that daemon process got started

pgrep -c vnstatd

which should reply "1". A reply of "0" indicates that the process has failed to start.

vnstat/install/in_ubuntu_with_image_output.txt · Last modified: 22.10.2022 15:30 (external edit)