cacti安装与配置.docx_第1页
cacti安装与配置.docx_第2页
cacti安装与配置.docx_第3页
cacti安装与配置.docx_第4页
cacti安装与配置.docx_第5页
已阅读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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论