1. Installing net-snmp
Yum - y Install NET-SNMP net-snmp-libs net-snmp-utils
2. Configure net-snmp
Vim/etc/snmpd.conf
View SystemView included. 1.3.6.1.2.1.1 modified to
View SystemView included. 1.3.6.1.2.1.
3 starting SNMP
Service SNMPD Start
4. Installing rrdtool
wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.7.tar.gz
Tar-xzf rrdtool-1.4.7.tar.gz
CD rrdtool-1.4.7
./configure--prefix=/usr/local/
If the error lib*, you need to install the following
Yum-y Install pango*
Then execute the ./configure--prefix=/usr/local/
Then execute make && make install
If you make an error during make, you need to install the following package
Yum-y Install Perl-extutils-cbuilder Perl-extutils-makemaker
5. Download and install cacti
wget http://www.cacti.net/downloads/cacti-0.8.8b.tar.gz
Tar-xzf cacti-0.8.8b.tar.gz
CD cacti-0.8.8b
Mv-f * /var/www/html/cacti
6. Enter the database and create the cacti library
/usr/mysql/bin/mysql-p
Create dadtabase cacti;
Grant all on cacti.* to [email protected]'%'identified by'Cacti';
7. Import Cacti.sql
Use cacti;
SOURCE Cacti.sql;
If you report the error 1064 (42000): You have a error in your SQL syntax; Check the manual-corresponds to your MySQL server version for the right syntax-use-near ' type=myisam ' on line
You need to edit Cacti.sql modify Type=myisam, the cause of this error is cacti.sql is deployed in mysql5.1, and I installed a high version of mysql5.6 so I need to make the following modifications
v im Cacti.sql
:%s/type=myisam/engine=myisam/g Replace and save
Then perform an import cacti.sql
8. Configuring include/config.php and include/global.php
v im include/config.php
$database _type = "MySQL"; $database _default = "cacti"; $database _hostname = "127.0.0.1"; $database _username = "cacti"; $ Database_password = "cacti"; $database _port = "3306";
Vim include/global.php
/* Default database settings*/$database _type = "MySQL"; $database _default = "cacti"; $database _hostname = "127.0.0.1"; $ Database_username = "cacti"; $database _password = "cacti"; $database _port = "3306";
9. Set RRA directory Permissions
C Hmod-r 777 Rra
10. Perform to see if normal
php/var/www/html/cacti/poller.php
One by one . Join a timed task
*/1 * * * */usr/local/php/bin/php/var/www/html/cacti/poller.php >/dev/null 2>&1
Open Browser input http://ip/cacti for installation and initialization
Default password is admin, need to reset password for the first time
Configuring the monitored side
Install the SNMP service first
Yum - y Install NET-SNMP net-snmp-libs net-snmp-utils
Configuring SNMP
Vim/etc/snmp/snmpd.conf
Modify the following configuration
Com2sec mynetwork ip/24 COMMUNITY//change to IP or IP segment on the monitor side
View MIB2 included. Iso.org.dod.internet.mgmt.mib-2 FC//Remove this comment
#以下为访问项目, if you want to monitor disk space, load and so on need to remove the comments
# Make sure Mountd is running
Proc Mountd #去掉前面的 "#"
# Make sure there be no more than 4 NTALKDS running, but 0 is ok too.
Proc NTALKD 4
# Make sure at least one sendmail, but less than or equal to ten is running.
Proc SendMail 10 1
# Check The/partition and make sure it contains at least megs.
disk/10000
# Check for loads:
Load 12 14 14
Save and restart the SNMPD service
s ervice snmpd Restar
This article is from the "Tabby Cat blog" blog, please be sure to keep this source http://bighuamao.blog.51cto.com/1995527/1633866
Installation and configuration of cacti under Linux