已阅读5页,还剩12页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Cacti安装与配置一、准备所需要的软件包Apache /Mysql /Php Rrdtool http:/oss.oetiker.ch/rrdtool/Net-snmp /Cacti /其中apache、mysql、php通过yum安装二、安装所需要的软件1.安装LAMProotcacti # yum -y install httpd mysql-server php php-mysql mysql-develrootcacti # chkconfig httpd onrootcacti # chkconfig mysqld onrootcacti # /etc/init.d/httpd startrootcacti # /etc/init.d/mysqld start安装完成后,可通过以下程序测试rootcacti html# cat inex.php2.安装rrdtoolRrdtool安装需要cairo、libxml2、pango库支持,可通过yum安装rootcacti # yum -y install cairo-devel libxml2-devel pango-develrootcacti # tar zxvf rrdtool-1.4.7.tar.gzrootcacti # cd rrdtool-1.4.7rootcacti rrdtool-1.4.7# ./configure -prefix=/usr/local/rrdtoolrootcacti rrdtool-1.4.7# make & make installrootcacti rrdtool-1.4.7# ln -s /usr/local/rrdtool/bin/* /usr/local/bin/3.安装net-snmprootcacti # tar zxvf net-snmp-.tar.gzrootcacti # cd net-snmp-rootcacti net-snmp-# ./configure -prefix=/usr/local/net-snmprootcacti net-snmp-# make & make installrootcacti net-snmp-# cp EXAMPLE.conf /etc/snmpd.confrootcacti # ln -s /usr/local/net-snmp/bin/* /usr/local/bin/rootcacti # vim /etc/snmpd.confrocommunity public localhost #去掉注释rootcacti # /usr/local/net-snmp/sbin/snmpd-c /etc/snmpd.conf加入开机启动rootcacti # echo /usr/local/net-snmp/sbin/snmpd -c /etc/snmpd.conf /etc/rc.local4.安装cactirootcacti # tar zxvf cacti-0.8.7i-PIA-3.1.tar.gzrootcacti # mv cacti-0.8.7i-PIA-3.1/* /var/www/html/#将cacti中的内容移到 web目录rootcacti # chown -R apache:apache /var/www/html/rootcacti # mysql -uroot#连接到mysql创建数据库mysql create database cacti;#创建cacti数据库mysql insert into mysql.user(host,user,password) values (localhost,cacti,password(cacti123);#建立用户cacti,密码cacti123mysql flush privileges;#重载mysql授权表mysql grant all on cacti.* to cactilocalhost identified by cacti123;#把数据库cacti授权于用户cactirootcacti # cd /var/www/html/rootcacti html# mysql -ucacti -pcacti123 cacticacti.sql #将cacti数据库导入修改网站配置文件,使用正确连接数据库参数rootcacti html# vim include/config.php$database_type = mysql;$database_default = cacti;$database_hostname = localhost;$database_username = cacti;$database_password = cacti123;$database_port = 3306;使用浏览器打开30/install/会看到安装向导,点下两个NEXT之后,出现以下:默认用户名和密码admin,第一次登录会要求更改密码5.设置cacti数据采集轮询时间rootcacti # crontab e*/5 * * * * env LANG=C /usr/bin/php /var/www/html/poller.php三、常用插件安装最新版本cacti-0.8.7i-PIA-3.1 集成了plugin架构扩展,所以可以直接开启后就可以安装其他插件打开“Console”-“User Management”-“admin”“Realm Permissions”,选择以下后,单保存”save”之后会在“console”中的“Configuration”看到一个Monitor安装(以图形方式显示设备状态)rootcacti # tar zxvf monitor-v1.3-1.tgzrootcacti # mv monitor /var/www/html/plugins/rootcacti # cd /var/www/html/plugins/monitor/rootcacti monitor# mysql -ucacti pcacti123 cacti/dev/null 2&1如果都配置正常理应可以看到类似下面图表6.邮件靠警设置a. 安装sendmail 组件首先要确保sendmail 相关组件的完整安装,我们可以使用如下的命令来完成sendmail 的安装:# yum install -y sendmail*然后重新启动sendmail服务:# service sendmail restart然后发送测试邮件,验证sendmail的可用性:邮箱能收到邮件表示测试成功# echo Hello World | mail b. 打开“console”-“settings”-“Mail/DNS”-“save”b. 设置完成后点左上角Send a Test Emai ,下面为邮件测试正常信息7.Cacti增加IIS监控模板(其他模板也类似)第一步 下载好的模板解压出来里面有四个文件都.XML的文件第二步 把模版导入到cacti第三步 查看模板第四步 添加被监控的IIS服务器Devices -ADD 第五步 添加图形及图形管理第六步 添加数据源第七步 图表显示8.设置告警阀值模板a.打开“co
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 拆迁协议书买车免税
- 拆迁与租房协议书合同
- 2025年RISC-VGPIO接口编程考核试卷
- 企业标识使用协议书
- 装饰服务合作合同协议书
- 保险资源互换协议书包括
- 中俄领土安全协议书
- 2025年教育AI算法透明度《AI教育算法应用场景限制规范》合规认证考核试卷
- 2025年房地产行业房地产企业社会责任市场调控认证考核试卷
- 2025年物流行业药品冷链绿色运输流程合规考核试卷
- 2025设备租赁合同补充协议范本设备租赁合同补充协议书
- 2025年内蒙古能源行业分析报告及未来发展趋势预测
- 浙江省杭州市2026届高三上学期11月一模试题 语文 含解析
- 2025-2026学年苏少版七年级综合实践活动上册(全册)教学设计(附目录)
- 全国大学生职业规划大赛《运动训练》专业生涯发展展示【高职(专科)】
- 腰椎骨折康复与护理
- 2025年物理湖南中考试题及答案
- 2025年韶关市(中小学、幼儿园)教师招聘考试题库及答案
- 小学法制教育及安全课件下载
- 2025至2030全球及中国油气田设备和服务行业产业运行态势及投资规划深度研究报告
- 实验安全考试试题及答案
评论
0/150
提交评论