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.

 

转载于:https://www.cnblogs.com/werookies/p/8036299.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值