在CentOS5/RHEL5上安装pandora fms

推荐一个服务器监控软件,完全免费的,叫Pandora FMS。刚开始用,还不太熟悉,今天先讲讲安装过程。
对网络,服务器监控软件感兴趣的,猛击[url=http://en.wikipedia.org/wiki/Network_monitoring_comparison]这里[/url]看看这篇比较各种监控软件的文章

项目的主页:[url]http://pandorafms.org[/url]
wiki:[url]http://www.openideas.info/wiki/index.php?title=Pandora[/url]
熟悉vmware又暂时不想自己动手安装的,可以猛击[url=http://downloads.sourceforge.net/pandora/PandoraFMS2.0_vmware.zip?use_mirror=]这里[/url]下载vmware的image,已经装好pandora fms的


wiki上有e文的安装文档,用的是Ubuntu 8.04,猛击[url=http://www.openideas.info/wiki/index.php?title=Pandora_2.0:Documentation_en:QIG]这里[/url]看官方文档。

服务器的安装分server和console两部分。

安装Pandora FMS需要MySQL(没看到文档里有提到具体的版本,我的是5.0)和php5.2+
干脆把我的环境版本都给出来吧
CentOS 5.2
httpd 2.2.3-11
mysql 5.0.45-7
php 5.2.6-1
perl 5.8.8-15
net-snmp 5.3.1-24
下面的安装过程,假定上面这些包已经安装配置好了。

1. server的安装
先把软件svn下来
[code="shell"]# svn co https://pandora.svn.sourceforge.net/svnroot/pandora/trunk
[/code]
cd到pandora server所在的目录,make and make install
[code="shell"]
# cd trunk
# cd pandora_server
# perl MakeFile.PL
Writing Makefile for PandoraFMS
# make
......
# make install
......
[/code]
在perl MakeFile.PL的时候,会检查它所需要的包。如果有缺少的包,会出现
Warning: prerequisite DBI 0 not found.
Warning: prerequisite SNMP 0 not found.
Warning: prerequisite XML::Simple 0 not found.
这样的提示

用CPAN来安装缺少的包,例如
[code="shell"]
# perl -MCPAN -e shell

cpan shell -- CPAN exploration and modules installation (v1.9301)
ReadLine support enabled

cpan[1]> install XML::Simple
......
[/code]

还有就是如果提示“I can't find net-snmp-config”,请确认已经装了net-snmp和net-snmp-devel

[b]注:[/b]
还有另外两个事要注意
1.看看/etc/snmp/snmptrapd.conf是否存在,如果不存在执行下面的命令

echo "authCommunity log public">/etc/snmp/snmptrapd.conf

2.有个文件链接是错误的,重建这个链接

rm /usr/share/pandora/util/PandoraFMS
ln -s /usr/lib/perl5/site_perl/5.8.8/PandoraFMS /usr/share/pandora/util/PandoraFMS



安装好之后,测试一下
[code="shell"]
# pandora_server -h

Pandora FMS Data Server 2.0 Build PS081029 Copyright (c) 2004-2008 ArticaST
This program is OpenSource, licensed under the terms of GPL License version 2.
You can download latest versions and documentation at http://www.pandorafms.org


Syntax:

pandora_server [ options ] < fullpathname to configuration file >

Following options are optional :
-v : Verbose mode activated, give more information in logfile
-d : Debug mode activated, give extensive information in logfile
-D : Daemon mode (runs in backgroup)
-P <file> : Store PID to file.
-q : Quiet startup
-h : This screen, show a little help screen
[/code]
看到这些基本上就成功一大半了。

接下来,配置Pandora Server

mkdir /var/spool/pandora
mkdir /var/spool/pandora/data_in
useradd pandora
mkdir /home/pandora
mkdir /home/pandora/.ssh
chown -R pandora /home/pandora
mkdir /var/log/pandora
chown pandora:root /var/spool/pandora/data_in
chmod 770 /var/spool/pandora/data_in
cp conf/pandora_server.conf /etc/pandora/
chmod 770 /etc/pandora/pandora_server.conf
cp pandora_* /etc/init.d/
ln -s /etc/init.d/pandora_server /etc/rc2.d/S90pandora_server
ln -s /etc/init.d/pandora_recon /etc/rc2.d/S90pandora_recon
ln -s /etc/init.d/pandora_network /etc/rc2.d/S90pandora_network
ln -s /etc/init.d/pandora_snmpconsole /etc/rc2.d/S90pandora_snmpconsole
ln -s /etc/init.d/pandora_wmi /etc/rc2.d/S90pandora_wmi
ln -s /etc/init.d/pandora_plugin /etc/rc2.d/S90pandora_plugin
ln -s /etc/init.d/pandora_prediction /etc/rc2.d/S90pandora_prediction
mkdir /usr/share/pandora
cp -R util /usr/share/pandora


pandora_server目录下,可以直接质执行上面的代码,不出意外的话,就算是成功了。

2. console的安装
控制台是web界面的,cp程序代码到apache的docroot下面

cd ..
cp pandora_console /var/www/html
chown -R apache /var/www/html/pandora_console

重启apache server

service httpd restart


打开浏览器,访问http://your.ip.address/pandora_console/install.php
按照提示,一路下一步,中间要输一下数据库的连接信息,此安装过程会在mysql server上创建一个数据库和用户,并且生成一个随机密码,记住这个密码,等会有用。

安装结束后,删除安装页面文件

rm upgrade.php
rm install.php
rm *.sql

打开http://your.ip.address/pandora_console,看到登录界面,初始的用户名是admin,密码pandora。

要想监控还得做一件事,就是修改/etc/pandora/pandora_server.conf文件
找到下面几行,按照你的情况修改
# dbname: Database name (pandora by default
# 数据库名称
dbname pandora

# dbuser: Database user name (pandora by default)
# 用户名
dbuser pandora

# dbpass: Database password
# 密码。就是前面让你记住的那个密码
dbpass szfenrlv

# dbhost: Database hostname or IP address
# 数据库服务器的地址
dbhost localhost

离成功不远了
启动pandora的服务

/etc/init.d/pandora_server start
/etc/init.d/pandora_network start
/etc/init.d/pandora_snmpconsole start
/etc/init.d/pandora_recon start
/etc/init.d/pandora_prediction start
/etc/init.d/pandora_wmi start
/etc/init.d/pandora_plugin start


ok,终于结束了。

待续。。。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值