ImageVerifierCode 换一换
格式:DOCX , 页数:12 ,大小:805.41KB ,
资源ID:7954265      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/7954265.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(构建Cacti服务器管理监测系统.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

构建Cacti服务器管理监测系统.docx

1、构建Cacti服务器管理监测系统Cacti(愿意仙人掌,也是次软件的名称)实在大型网络常见的性能监测软件,可提供对CPU负载、内存占用、运行进程数、磁盘空间、网卡流量等各种数据进行监测。Cacti本身只是基于PHP语言编写的一套管理套件,需要使用NetSNMP工具采集监测数据,并结合RRDtool(轮询数据库工具)记录数据及绘制图片,并通过web页面的形式展现给管理员用户。原理图;软件获取: Cacti下载 官方站点: RRDTool Round Robin Database Tool,轮询数据库工具 官方站点:http:/oss.oetiker.ch/rrdtool需求:Redhat 5.4

2、或者CentOS5.5系统,采用文本安装模式最小化安装,构建YUM。实现步骤: 一配置被监测端(snmpd) 在被检测的linux主机中,安装好netsnmp软件包,并配置启动snmpd服务,以便允许Cacti系统采集数据。1 安装netsnmp软件包netsnmp软件需要用到lm_sensors提供的硬件监测模块,安装时直接使用系统光盘中的rpm包文件,依次安装lm_sensors、netsnmp。(被监测的服务器需要安装snmpd服务,在监测服务器上还需要安装net-snmp-utils-5.3.2.2-7.el5.i386.rpm)rootwww # mount /dev/cdrom /

3、media/mnt/rootwww # cd /media/mnt/Server/rootwww Server# rpm -ivh lm_sensors-2.10.7-4.el5.i386.rpmrootwww Server# rpm -ivh net-snmp-5.3.2.2-7.el5.i386.rpmrootwww Server# rpm -ivh net-snmp-utils-5.3.2.2-7.el5.i386.rpm2 配置及启动snmpd服务修改/etc/snmp/snmpd.conf文件修改内容:把com2sec notConfigUser default publicacce

4、ss notConfigGroup any noauth exact systemview none none#view all included .1 80修改为com2sec notConfigUser 192.168.1.111 publicaccess notConfigGroup any noauth exact all none noneview all included .1 803 启动snmpd服务并设置开机启动rootwww # service snmpd startrootwww # chkconfig -level 35 snmpd on二配置监测服务端(Cacti)C

5、acti监测服务端需要有Apache、Mysql、PHP网站平台的支持,且需要预先安装有gd、zlib等软件包。1 安装LAMP平台、启动服务并设置开机启动rootwww # yum install httpd* -yrootwww # yum install mysql* -yrootwww # yum install php* -yrootwww # service httpd startrootwww # service mysqld startrootwww # chkconfig -level 35 httpd onrootwww # chkconfig -level 35 mysq

6、ld on2 安装rrdtool软件包rrdtool需要的软件包libart_lgpl-2.3.17-4.i386libpng-1.2.10-7.1.el5_3.2.i386 freetype-2.2.1-21.el5_3.i386 需预先安装rootwww # tar zxf rrdtool-1.2.27.tar.gzrootwww # cd rrdtool-1.2.27rootwww rrdtool-1.2.27# ./configure -prefix=/usr/localrootwww rrdtool-1.2.27# makerootwww rrdtool-1.2.27# make i

7、nstall3 安装配置Cacti服务器套件安装Cacti文件包,解压至WEB服务器的网页目录,并添加用于读写监测数据的用户rootwww # cd /var/www/html/rootwww html# tar zxf cacti-0.8.7b-cn-utf8.tar.gzrootwww html# mv cacti-0.8.7b-cn-utf8 cactirootwww html# useradd cactiuserrootwww html# chown -R cactiuser:cactiuser cacti/rra/ cacti/log/设置监测数据库。建立保存监测数据的数据库、表,设

8、置好授权访问数据库的用户和密码rootwww html# service mysqld startrootwww html# mysql -u root -pmysql create database cactidb default character set utf8;mysql grant all on cactidb.* to cactiuserlocalhost identified by 123;mysql exitrootwww html# mysql -u cactiuser -p cactidb cacti/cacti.sql /导入数据表4 安装PA、Thold、Monito

9、r插件扩展rootwww # cd /var/www/html/cactirootwww cacti# tar zxf cacti-plugin-arch.tar.gzrootwww cacti# mysql -u cactiuser -p cactidb PA-utf.diffrootwww cacti# patch -p1 -N PA-utf.diffrootwww cacti# cd pluginsrootwww plugins# tar zxf settings-0.5.tar.gzrootwww plugins# tar zxf monitor-0.8.2.tar.gzrootwww

10、 plugins# tar zxf thold-0.3.9.tar.gzrootwww plugins# mysql -u cactiuser -p cactidb thold/thold.sqlrootwww plugins# mysql -u cactiuser -p cactidb monitor/monitor.sql5调整Cacti配置文件rootwww cacti# vi include/config.php6 调整httpd设置rootwww # vi /etc/httpd/conf/httpd.conf修改http.conf文件,以便支持自动查找索引页index.php,并将u

11、tf8作为默认的中文页面字符集。Listen 192.168.1.111:80DocumentRoot /var/www/html/cacti Options NoneAllowOverride None Order allow,deny Allow from allDirectoryIndex index.phpAddDefaultCharset UTF-87 重启httpd服务,并查看其端口rootwww # service httpd restartrootwww # service mysqld restartrootwww # netstat -anpt | grep :808 添加

12、任务计划cactiuserwww $ php /var/www/html/cacti/poller.phpcactiuserwww $ crontab e内容如下;*/5 * * * * /usr/bin/php /var/www/html/cacti/poller.php &/dev/nullcactiuserwww $ exitrootwww # service crond startrootwww # chkconfig -level 2345 crond on9 通过web页面初始化安装cacti使用web浏览器访问Cacti服务器,第一次访问Cacti界面时,会自动跳转到Cacti的初始化安装向导界面。如图,点击下一步即可为了在监测图像中正常现实中文,还需要设置RRDtool所使用的中文字体路径,此版本的路径应为“/usr/share/fonts/zh_TW/TrueType/bsmi00lp.ttf”,点击右下方的保存即可。

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1