-
XYmon
网络监控之一
-->
XYMON
安装步骤
一、安装之前的准备工作:
第一、下载安装
centOS 5.0
或者
6.0
。
第二、笔者是使用
VMwor
kstation
安装
CentOS
,
安装步骤简单。
二、
准备工作完成后
,
我们就可以进行
XYMON
的安装的
。
笔者只是在一台虚拟机上安装,
取消那些繁琐的
Gateway
,
DNS,AD
等等一些东西。我们直接君如主题。
1.
添加
rpmforge
软件;
[root@xymonsvr
~]#
wget
< br>/redhat/el5/en/i386/rpmforge/RPMS/rpmforge- release-0.3.6-
#
下载安装文件
最新
rpm
包
[root@xymonsvr ~]#
rpm --import
/rpm/packages/
#
导入验证文件,基本通用的。
[root@xymonsvr ~]#
rpm -K
#
注意
K
为
大写
[root@xymonsvr ~]#
rpm -i
#
安装
2.
添加
xymon
的源代码文件包备用,这里我们下载
4.2.3
的版本,最新的是
4.3.7
[root@xymonsvr
~]#
wget
/projects/xymon/files/Xymon/4.2.3/
/projects/xym
on/files/Xymon/4.3.6/
/project/xymon/Xymon/4.3.7/
版本高,比较稳定,参数比较好设定。
Resolving ... 140.115.17.45
Connecting to |140.115.17.45|:80...
HTTP request sent, awaiting response...
200 OK
Length: 2313567 (2.2M)
[application/x-gzip]
Saving to:
`'
10% [===>
] 253,933 24.2K/s eta 85s
<
以下省略
>
3.
安装
Xymon
需要用到的组件
,
这里通
CentOS
的软件管理软
件
yum
从软件源直接下
载并安装
p>
;
(
如果你安装的
CentOS
server
版本的话,需要额外安装一下两个插件)
yum install
gcc-c++
yum install
httpd
[root@xymonsvr ~]#
yum install fping
#
安装
fping
Loaded plugins:
fastestmirror
Loading mirror speeds
from cached hostfile
…
<
中间省略
>...<
/p>
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 40 k
Is
this ok [y/N]: y #
输入
y
确认安装
Downloading
Packages:
|
40 kB 00:02
…<
中间省略
>...
Installed: fping.i386 0:
Complete!
[root@xymonsvr ~]#
yum install rrdtool-devel
#
安装
rrdtool-
devel
Loaded plugins:
fastestmirror
Loading mirror speeds
from cached hostfile
* rpmforge:
* base:
* updates:
* addons:
* extras:
Setting up Install Process
…
<
中间省
略
>...
Install 5 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 2.8 M
Is this ok [y/N]: y
#
输入
y
确认安装
Downloading Packages:
(1/5):
| 6.8 kB 00:00
(2/5):
| 51 kB 00:01
(3/5): 5_
| 274 kB 00:14
(4/5):
| 913 kB 00:16
(5/5): 5_
| 1.6 MB 01:56
…
<
中间省略
>...
Installed:
rrdtool-devel.i386 0:
Dependency
Installed: perl-rrdtool.i386 0: rrdtool.i386 0:
ruby.i386 0:5_3.7 ruby-libs.i386
0:5_3.7
Complete!
[root@xymonsvr ~]#
yum install pcre-devel
#
安装
pcre
Loaded plugins:
fastestmirror
Loading mirror speeds
from cached hostfile
* rpmforge:
* base:
* updates:
* addons:
* extras:
Setting up Install Process
…
<
中间省略
>...
Total download size:
176 k
Is this ok [y/N]: y
#
输入
y
确认安装
Downloading Packages:
5_
| 176 kB 02:44
Running
rpm_check_debug
Running Transaction
Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : pcre-devel
[1/1]
Installed: pcre-
devel.i386 0:5_1.7
Complete!
4.
创建一个用户
:xymon
以用于运行
Xymon Monitor
Server;
[root@xymonsvr ~]#
useraddxymon
#
创建用户
[root@xymonsvr ~]#
passwdxymon
#
创建密码
(
无密码将无法登入
)
Changing password for user xymon.
New UNIX password:
#
输入一个密码吧
BAD PASSWORD: it is too
simplistic/systematic
#
说密码太
简单
?
无视
Retype new UNIX password:
#
再输入一次
passwd: all authentication tokens
updated successfully.
5.
开始动手安装了
,
解压缩源代码
[root@xymonsvr ~]#
tar -zxvf
之后进入
xymon-4.2.3
的文件夹,如下:
[root@xymonsvr ~]#
ll
#
查
看当前目录中的文件和文件的详细信息
,
等于
< br>ls -l
total 2340
-rw------- 1 root root 1308 Dec
4 04:40
-rw-r--r-- 1 root root
26738 Dec 4 04:40
-rw-r--r-- 1
root root 4740 Dec 4 04:39
-rw-r
--r-- 1 root root 16698 Mar 9 2007
drwxr-xr-x 15xymonxymon 4096 Dec
14 16:08
xymon-4.2.3
-rw-r--
r-- 1 root root 2313567 Feb 22 2009
[root@xymonsvr ~]#
cd
xymon-4.2.3
#
切换目录到
xymon-4.2.3
[root@xymonsvr xymon-4.2.3]#
#
提示符变咯
运行
< br>configure
检验系统环境,生成
makefil
e
[root@xymonsvr
xymon-4.2.3]#
./configure
#
运行
configure,
一定要加
./
因为当前目
< br>录没有加入至系统的环境变量
Configuration script for
Xymon
This script asks a few
questions and builds a Makefile to compile
Xymon
Checking your make-
utility
Checking pre-requisites for
building Xymon
Checking for
fping ...
Hobbit has a built-in ping
utility (hobbitping)
However, it is not
yet fully stable and therefore it
may
be best to use the external fping utility instead.
I found fping in /usr/sbin/fping
Do you want to use it [Y/n]
?
#
输入
y
确认
y
Checking to see if
'/usr/sbin/fping 127.0.0.1' works ...
127.0.0.1 is alive
…<
中间省略
>...
Checking for RRDtool ...
…<
中间省略
>...
Do you want to be able to test SSL-
enabled services (y) ?
#
输入
y
确认
y
Checking for LDAP ...
Found LDAP include files in
/usr/include
Found LDAP libraries in
/usr/lib
Xymon can use your
OpenLDAP LDAP client library to test LDAP
servers.
Do you want to be
able to test LDAP servers (y) ?
#
输入
y
确认
y
Enable experimental
support for LDAP/SSL (OpenLDAP 2.x
only)
(y) ?
#
回车应用默认值
Checking
for clock_gettime() requiring librt ...
clock_gettime() requires
librt
Checking for Large
File Support ...
Large File
Support OK
Setting up for a
Xymon server
What userid
will be running Xymon [xymon] ?
#
回车应用默认值
Found passwd entry for user
xymon:x:500:500::/home/xymon:/bin/bash
Where do you want the Xymon
installation [/home/xymon] ?
#
回车应用默认值
OK, will configure to use /home/xymon
as the Xymontoplevel directory
What URL will you use for the Xymon
webpages [/xymon] ?
#
回车应用默认值
Where to put the Xymon CGI scripts
[/home/xymon/cgi-bin] ?
#
回车应用默认值
(Note:
This is the filesystem directory - we will get to
the URL shortly)
What is the
URL for the Xymon CGI directory [/xymon-cgi] ?
#
回车应用默认值
(Note:
This is the URL - NOT the filesystem
directory)
…<
中间省略
>...
Where to put
the Xymon Administration CGI scripts
[/home/xymon/cgi-secure] ?
#
回车应用默
认值
(Note: This is the filesystem directory
- we will get to the URL shortly)
What is the URL for the Xymon
Administration CGI directory [/xymon-seccgi]
?
#
回车应用默
< br>认值
(Note: This is the URL
- NOT the filesystem directory)
** Note that you may need to modify
your webserver configuration.
** After
installing, see /home/xymon/server/etc/ for an
example configuration.
To
generate Xymon availability reports, your
webserver
must have write-access to a
directory below the Xymon
top-level
directory. I can set this up if you tell me
what group-ID your webserver runs with.
This is typically
'nobody' or 'apache'
or 'www-data'
What group-ID
does your webserver use [nobody] ?
#
回车应用默认值
Where to put the Xymonlogfiles
[/var/log/xymon] ?
#
回车应用默认值
What is the name of this host []
?
#
回车应用默认值
What is the IP-address of this host
[127.0.0.1] ?
192.168.198.128
#
输入当前
Server
的
IP
Where should I
install the Xymon man-pages (/usr/local/man)
?
#
回车应用默认值
Using
Linux Makefile settings
Created Makefile with the necessary
information to build Xymon
Some
defaults are used, so do look at the Makefile
before continuing.
Configuration complete - now run make
(GNU make) to build the tools
6.
运行
Make
进行编译,大约
5<
/p>
分钟;
[root@xymonsvr xymon-4.2.3]#
make
…<
中间省略
>...
Build complete. Now run 'make install'
as root
输入
make
install
进行安装
;
[root@xymonsvr
xymon-4.2.3]#
make install
…<
中间省略
>...
Installation
complete.
You must configure
your webserver for the Hobbit webpages and CGI-
scripts.
A sample Apache configuration
is in /home/xymon/server/etc/
If you
have your Administration CGI scripts in a separate
directory,
then you must also setup the
password-file with the htpasswd
command.
To start Hobbit, as
the xymon user run '/home/xymon/server/bin/ start'
To view the Hobbit webpages, go to
/xymon
7.
设置
Apache web
serverice
[root@xymonsvr ~]#
chkconfighttpd on
[root@xymonsvr ~]#
chkconfig
--list httpd
#
查看
httpd
启动状态
,
可以看到
runlevel
为
on,
设定成
功
httpd 0:off 1:off 2:on
3:on 4:on 5:on 6:off
将
Xymon Monitor Server
的配置文件添加
Apache
配置文件的底部
,
重启
httpd<
/p>
生效
[root@xymonsvr
~]#
cat
/home/xymon/server/e
tc/>>/etc/httpd/conf/
#
添加配置文件
[root@xymonsvr ~]#
/etc/init.d/httpd restart
#
重启服务
-
-
-
-
-
-
-
-
-
上一篇:英语综合训练题
下一篇:AVR熔丝位锁定位中英文对照详解