How To Install VnStat Network Monitoring on CentOS 7

r00t January 13, 2017

In this tutorial we will show you how to install and configuration of VnStat network monitoring on your CentOS 7 server. For those of you who didn’t know, VnStat is a console based network traffic monitoring tool design for Linux and BSD. It allows the users to maintain a log of network traffic for the selected interfaces. In this Vnstat tool, the interface bandwidth will reduce automatically.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation VnStat network monitoring tool on a CentOS 7 server.

VnStat Features

  • Multiple output options.
  • Generate png graphic output.
  • Consumes lite portion of system resources.
  • Monitor multiple network interfaces at same time.
  • Sort the data by month, week, hour and day.
  • Low CPU usage.

Install VnStat Network Monitoring on CentOS 7

Step 1. First, you will need enable EPEL repositories package for your version of Linux

Step 2. Installing VnStat.

Use yum command line utility to install vnstat package on your system:

Once installed, start and enable the Vnstat services:

Step 3. Show Statics using vnStat Command Line.

Using vnstat command line utility you can view statistics on bandwidth on per day, per month and per hour basis. It also provides option to show statistics in real-time:

Step 4. Configure vnStat PHP Web Based Interface.

vnStat also provides php based web interface to show graphical statistics. In order to set up vnStat web interface, it required install LAMP stack on CentOS 7.

Download vnStat php code using below given url.

Extract downloaded archive in web accessible directory, eg: /var/www/html/:

Edit the config.php file and set the following parameters:

Accessing VnStat via web browser, Open your favorite browser and navigate to http://yourdomain.com/ or http://server-ip.

Install VnStat Network Monitoring on CentOS 7

Congratulation’s! You have successfully installed VnStat. Thanks for using this tutorial for installing VnStat network monitoring on CentOS 7 systems. For additional help or useful information, we recommend you to check the official VnStat web site.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get a best deal!

Save

Share on Google+0Share on Facebook0Tweet about this on TwitterShare on Tumblr0Share on StumbleUpon1Share on Reddit1Pin on Pinterest2
The Tags:

Leave a Comment