由于cacti 1.1.x系列发布后,变化比较大,集成了很多插件,自带自动发现功能,所以记录下来,@H_301_1@
@H_301_1@
1、安装mariadb 10.1@H_301_1@
cacti 1.1.0 需要MysqL >= 5.6,所以这里选择mariadb 10.1@H_301_1@
yuminstallcentos-release-openstack-ocata-y yuminstallmariadb-server-y systemctlenablemariadb systemctlstartmariadb
@H_301_1@
2、mariadb参数调整(最低要求)@H_301_1@
max_heap_table_size=128M max_allowed_packet=32M tmp_table_size=64M join_buffer_size=64M innodb_buffer_pool_size=512M innodb_doublewrite=off innodb_flush_log_at_timeout=3
导入时区信息@H_301_1@
@H_301_1@
MysqL_tzinfo_to_sql/usr/share/zoneinfo/|MysqL-uroot-pMysqL
@H_301_1@
3、安装lamp@H_301_1@
yuminstallhttpdPHPPHP-MysqLndPHP-gdPHP-snmpPHP-pecl-zendopcachewget-y echo"ServerTokensProd">>/etc/httpd/conf/httpd.conf echo"ServerSignatureOff">>/etc/httpd/conf/httpd.conf systemctlenablehttpd systemctlstarthttpd
@H_301_1@
4、下载cacti@H_301_1@
cd/var/wwww/html wgethttp://www.cacti.net/downloads/cacti-1.1.0.tar.gz tarzxvfcacti-1.1.0.tar.gz mvcacti-1.1.0cacti chown-Rapache:apache/var/www/html/cacti/resource/ chown-Rapache:apache/var/www/html/cacti/scripts chown-Rapache:apache/var/www/html/cacti/log chown-Rapache:apache/var/www/html/cacti/cache/boost chown-Rapache:apache/var/www/html/cacti/cache/mibcache chown-Rapache:apache/var/www/html/cacti/cache/realtime chown-Rapache:apache/var/www/html/cacti/cache/spikekill
@H_301_1@
5、给cacti建库@H_301_1@
MysqL>createdatabasecactidefaultcharsetutf8mb4; MysqL>usecacti; MysqL>source/var/www/html/cacti/cacti.sql; MysqL>grantalloncacti.*to'cactiuser'@'localhost'identifiedby'cactiuser'; MysqL>grantselectonMysqL.time_zone_nametocactiuser@'localhost'; MysqL>flushprivileges;
@H_301_1@
6、访问http://ip/cacti 进入安装向导@H_301_1@
@H_301_1@
7、默认用户密码admin/admin,首次登陆要求改密码,密码长度和复杂度都比较严格,点赞。@H_301_1@
@H_301_1@
a、定义snmp选项,比如snmpv2,community为abc b、定义扫描网段,比如192.168.0.0/24,定时扫描,发现snmp端口存活的机器自动添加到cacti, c、定义规则,将扫描到的机器,按照操作系统分类,放入不同的tree,划不同的图
@H_301_1@
9、设置定时任务@H_301_1@
*/5****apache/usr/bin/PHP-q/usr/share/cacti/poller.PHP>/dev/null
@H_301_1@
@H_301_1@
其他@H_301_1@
cacti 1.1.x 支持中文,但是汉化不彻底,手痒的同学可以按照下面的办法汉化:@H_301_1@
@H_301_1@
1、安装@H_301_1@
yuminstallgettext-y
@H_301_1@
cd/var/www/html/cacti/locales/LC_MESSAGES /usr/bin/msgunfmtchinese_china_simplified.mo-ochinese_china_simplified.po
@H_301_1@
@H_301_1@
/usr/bin/msgfmtchinese_china_simplified.po-ochinese_china_simplified.mo原文链接:https://www.f2er.com/centos/378221.html