Gentoo还是不错的Linux,尝试了在Gentoo下安装Cacti监控,非常便捷 #emerge cacti #emerge net-snmp #webapp-config -I -h localhost -d cacti cacti 0.8.7e-r3 File: <path to cacti>include/config.php $database_type = "mysql"; $database_default = "cacti"; $database_hostname = "localhost"; $database_username = "cactiuser"; $database_password = "cactipass"; $database_port = "3306"; mysql -u root -p mysql> create database cacti; mysql> grant all on cacti.* to cactiuser@localhost; mysql> set password for cactiuser@localhost=password('cactipass'); mysql> exit Cacti目录下 chown -R apache:apache rra/ log/ 到http://www./downloads/patches/下载相同版本的插件管理器 PIA 解压到Cacti目录 mysql -uroot cacti <cacti-plugin-arch/pa.sql patch -p1 -N <cacti-plugin-arch/cacti-plugin-0.8.7e-PA-v2.6.diff 修改Cacti目录/include/global.php Cacti目录下创建plugins 进入plugins 下载thold,monitor,settings,discovery,hostinfo,aggregate,weathermap插件 解压后,有数据库的导入cacti数据库 编辑global.php 再$plugins $plugins[] = $plugins[] = 其他插件相同 设置5分钟采集一次数据 Nano /etc/crontab */5 * * * * apache php执行程序目录(如/usr/bin/php) /cacti目录/poller.php > /dev/null 2>&1 |
|