vnstat.sh 333 B

1234567891011
  1. #!/bin/bash
  2. yum install -y wget sqlite-devel gcc
  3. wget https://github.com/vergoh/vnstat/releases/download/v2.1/vnstat-2.1.tar.gz
  4. tar zxvf vnstat-2.1.tar.gz
  5. cd vnstat-2.1
  6. ./configure --prefix=/usr --sysconfdir=/etc && make
  7. make install
  8. cp -v examples/init.d/redhat/vnstat /etc/init.d/
  9. chkconfig vnstat on
  10. service vnstat start
  11. vnstat -l