Environment: rhel6.4 x86-64 selinux and iptables disables
Reference webpage:
Http://docs.cacti.net/manual:088:1_installation.1_install_unix
Snmp Configuration:
Http://www.cyberciti.biz/nixcraft/linux/docs/uniqlinuxfeatures/mrtg/mrtg_config_step_3.php
1. Processing dependencies;
Yum install httpd php-mysql php-gd php-xml wget patch mysql-server rrdtool-y
Yum install net-snmp *-y
Use rpm-qa | gerp php to view the corresponding version, note that the version must be consistent, only high, not low, at this time is the php-5.3.3-22.el6.x86_64
No php-snmp in 6.4, download http://rpmfind.net/linux/rpm2html/search.php? Query = php-snmp5.3.3-22)
Yum localinstall php-snmp-5.3.3-22.el6.x86_64.rpm
Compile vim/var/www/html/index. php
{
<? Php
Phpinfo ()
?>
}
Http: // localhost/index. php
Use Ctrl + F to check whether the corresponding module is installed
Configure php
Vim/etc/php. ini
{
Safe_mode = Off
Date. timezone = Asia. Shanghai
File_uploads = On
}
View the php module. cd/etc/php. d.
Cat mysql. ini
{
Extension = mysql. so
}
Cat snmp. ini
{
Extension = snmp. so
}
Configure snmp
Vi/etc/snmp/snmpd. conf
{
Found: com2sec notConfigUser default public
Replace:
Com2sec local localhost public
Com2sec mynetwork 192.168.0.0/24 public
Find: group notConfigGroup v1 notConfigUser
Group notConfigGroup v2c notConfigUser
Replace:
Group MyRWGroup v1 local
Group MyRWGroup v2c local
Group MyRWGroup usm local
Group MyROGroup v1 mynetwork
Group MyROGroup v2c mynetwork
Group MyROGroup usm mynetwork
Find view systemview embedded ded. 1.3.6.1.2.1.1.
View systemview embedded ded. 1.3.6.1.2.1.25.1.1
Note that "1." is added before 25 in the second row.
Finally:
View systemview embedded ded. 1.3.6.1.2.1.1
View systemview embedded ded. 1.3.6.1.2.1.1.25.1.1
View all supported ded. 1 80
Find:
Access notConfigGroup "" any noauth exact systemview none
Replace with: access MyROGroup "" any noauth exact all none
Access MyRWGroup "" any noauth exact all none
Find syslocation Unknown (edit/etc/snmp/snmpd. conf)
Syscontact Root (configure/etc/snmp. local. conf)
Changed:
Syslocation RHEL6.4
Syscontact Root <root @ localhost>
}
Chkconfig snmpd on
Service snmpd start
Detection:
Snmpwalk-v 1-c public localhost IP-MIB: ipAdEntIfIndex
Configure cacti
Download: cacti-0.8.8b.tar.gz
Tar cacti-0.8.8b.tar.gz-C/var/www/html/
Music cacti-0.8.8b cacti
Configure mysql
/Etc/init. d/mysqld start
Mysql_secure_installation // password = westos
Mysqladmin-pwestos create cacti
Mysql-uroot-pwestos cacti </var/www/html/cacti. SQL
Mysql-pwestos
> Grant all on cacti. * to cacti @ localhost identified by 'cacti ';
> Flush privileges;
> Quit
Vim/var/www/html/cacti/include/config. php
{
$ Database_type = "mysql ";
$ Database_default = "cacti ";
$ Database_hostname = "localhost ";
$ Database_username = "cacti ";
$ Database_password = "cacti ";
$ Database_port = "3306 ";
$ Database_ssl = false;
$ Url_path = "/cacti /";
$ Cacti_session_name = "Cacti ";
}
Create a cacti user
Cd/var/www/html/cacti
Useradd cacti
Chown-R cacti rra log
Su-cacti
Crontab-e
{
*/5 * php/var/www/html/cacti/poller. php>/dev/null 2> & 1
}
No extended modules are added in this article, which will be added later and integrated with nagios to achieve more sound system monitoring.