Search code examples
centosbandwidth

Installing vnstat on CentOS 6 shows "No package vnstat available"


I'm trying to install vnstat on CentOS 6. I used the command found in the docs 'yum install vnstat' but it shows the below:

[root@m2 ~]# yum install vnstat
    Loaded plugins: fastestmirror
    Setting up Install Process
    Determining fastest mirrors
     * base: mirror.its.dal.ca
     * extras: mirror.its.dal.ca
     * updates: mirror.its.dal.ca
    base                                                                                                    | 3.7 kB     00:00
    extras                                                                                                  | 3.4 kB     00:00
    extras/primary_db                                                                                       |  31 kB     00:00
    updates                                                                                                 | 3.4 kB     00:00
    updates/primary_db                                                                                      | 3.3 MB     00:03
    No package vnstat available.
    Error: Nothing to do

Does anyone know how to resolve the No package vnstat available issue?


Solution

  • vnstat is not available in base repository. You first need to enable EPEL (Extra Packages for Enterprise Linux) repository with:

    yum install epel-release

    After that, yum install vnstat should work.