Using Cacti to monitoring network bandwidth
1.Cacti Installation
/*Install LAMP*/ yum -y install mariadb-server mariadb httpd php php-mysql service httpd start chkconfig httpd on service mariadb start chkconfig mariadb on mysqladmin -uroot password Wanda01! mysqladmin --user=root --password reload /*Install related library and rrdtool*/ yum -y install zlib freetype libjpeg fontconfig gd libxml2 php-gd rrdtool /*Install SNMP tool*/ yum -y install net-snmp net-snmp-utils service snmpd start chkconfig snmpd on /*Install Cacti*/ cd /opt yum -y install wget wget http://www.cacti.net/downloads/cacti-0.8.8h.tar.gz tar xvzf cacti-0.8.8h.tar.gz mv cacti-0.8.8h /var/www/html/cacti /*Create user and set up cacti poller job*/ useradd cactiuser passwd cactiuser su cactiuser crontab -e */1 * * * * /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1 /*grant cacti file and folder permission to the new created user*/ su root chgrp -R cactiuser /var/www/html/cacti chown -R cactiuser /var/www/html/cacti/rra chown -R cactiuser /var/www/html/cacti/log chown -R cactiuser /var/www/html/cacti/poller.php /*create database*/ mysql -uroot -p MariaDB [(none)]> create database cacti; MariaDB [(none)]> exit /*import cacti databse*/ mysql -u root -p cacti < /var/www/html/cacti/cacti.sql /grant database permission/ mysql -uroot -p MariaDB [(none)]> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactiuser'; MariaDB [(none)]> flush privileges; MariaDB [(none)]> exit
After installation, login to the portal via http://server_ip/cacti to continue with the configuration and you will see the web page as below, make sure there is no warning appearred. The default user name and password is admin/admin, and we need to change the password after login.