User Tools

Site Tools


vnstat:install:in_redhat

This is an old revision of the document!


Installing vnStat in Red Hat

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

Red Hat 7

Open a terminal and gain root permissions

su -

Verify that root has been gained

whoami

which should reply "root".

Install needed development packages

yum install make gcc wget sqlite sqlite-devel

Get the latest release and extract it

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

Compile and install the binaries

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

Install the service files 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.

Red Hat 6

Open a terminal and gain root permissions

su -

Verify that root has been gained

whoami

which should reply "root".

Install needed development packages

yum install make gcc wget sqlite sqlite-devel

Get the latest release and extract it

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

Compile and install the binaries

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

Install the service files and start the daemon

cp -v examples/init.d/centos/vnstat /etc/init.d/
chkconfig vnstat on
service vnstat start

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_redhat.1579026559.txt.gz · Last modified: 14.01.2020 20:32 (external edit)