login as: root
[email protected]'s password: Last login: Mon Dec 14 14:29:51 2009 from 192.168.1.2 [root@xymonsvr ~]# |
[root@xymonsvr ~]# echo $LANG #查看当前默认语言
zh_CN.UTF-8 [root@xymonsvr ~]# echo 'LANG="en_US.UTF-8"' >/etc/sysconfig/i18n #更改默认语言为美国英语 [root@xymonsvr ~]# echo $LANG #再次查看当前默认语言,可以看到已经变成美国英语 en_US.UTF-8 |
[root@xymonsvr ~]# wget http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm #下载安装文件
[root@xymonsvr ~]# rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt #导入验证文件 [root@xymonsvr ~]# rpm -K rpmforge-release-0.3.6-1.el5.rf.i386.rpm [root@xymonsvr ~]# rpm -i rpmforge-release-0.3.6-1.el5.rf.i386.rpm #安装 |
[root@xymonsvr ~]# wget http://ncu.dl.sourceforge.net/project/hobbitmon/hobbitserver/4.2.3/xymon-4.2.3.tar.gz
--15:08:54-- http://ncu.dl.sourceforge.net/project/hobbitmon/hobbitserver/4.2.3/xymon-4.2.3.tar.gz Resolving ncu.dl.sourceforge.net... 140.115.17.45 Connecting to ncu.dl.sourceforge.net|140.115.17.45|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 2313567 (2.2M) [application/x-gzip] Saving to: `xymon-4.2.3.tar.gz'
10% [===> ] 253,933 24.2K/s eta 85s
<以下省略>
|
[root@xymonsvr ~]# yum install fping #安装fping
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile …<中间省略>... 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: fping-2.4-1.b2.2.el5.rf.i386.rpm | 40 kB 00:02 …<中间省略>... Installed: fping.i386 0:2.4-1.b2.2.el5.rf Complete! |
[root@xymonsvr ~]# yum install rrdtool-devel #安装rrdtool-devel
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * rpmforge: fr2.rpmfind.net * base: ftp.isu.edu.tw * updates: ftp.isu.edu.tw * addons: ftp.isu.edu.tw * extras: mirrors.163.com 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): rrdtool-devel-1.3.8-2.el5.rf.i386.rpm | 6.8 kB 00:00 (2/5): perl-rrdtool-1.3.8-2.el5.rf.i386.rpm | 51 kB 00:01 (3/5): ruby-1.8.5-5.el5_3.7.i386.rpm | 274 kB 00:14 (4/5): rrdtool-1.3.8-2.el5.rf.i386.rpm | 913 kB 00:16 (5/5): ruby-libs-1.8.5-5.el5_3.7.i386.rpm | 1.6 MB 01:56 …<中间省略>... Installed: rrdtool-devel.i386 0:1.3.8-2.el5.rf Dependency Installed: perl-rrdtool.i386 0:1.3.8-2.el5.rf rrdtool.i386 0:1.3.8-2.el5.rf ruby.i386 0:1.8.5-5.el5_3.7 ruby-libs.i386 0:1.8.5-5.el5_3.7 Complete! |
[root@xymonsvr ~]# yum install pcre-devel #安装pcre
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * rpmforge: fr2.rpmfind.net * base: mirror.centos.net.cn * updates: mirror.centos.net.cn * addons: mirror.centos.net.cn * extras: mirror.centos.net.cn Setting up Install Process …<中间省略>...
Total download size: 176 k
Is this ok [y/N]: y #输入y确认安装 Downloading Packages: pcre-devel-6.6-2.el5_1.7.i386.rpm | 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:6.6-2.el5_1.7
Complete! |
[root@xymonsvr ~]# useradd xymon #创建用户
[root@xymonsvr ~]# passwd xymon #创建密码(无密码将无法登入) 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. |
[root@xymonsvr ~]# tar -zxvf xymon-4.2.3.tar.gz |
[root@xymonsvr ~]# ll #查看当前目录中的文件和文件的详细信息,等于ls -l
total 2340 -rw------- 1 root root 1308 Dec 4 04:40 anaconda-ks.cfg -rw-r--r-- 1 root root 26738 Dec 4 04:40 install.log -rw-r--r-- 1 root root 4740 Dec 4 04:39 install.log.syslog -rw-r--r-- 1 root root 16698 Mar 9 2007 rpmforge-release-0.3.6-1.el5.rf.i386.rpm drwxr-xr-x 15 xymon xymon 4096 Dec 14 16:08 xymon-4.2.3 -rw-r--r-- 1 root root 2313567 Feb 22 2009 xymon-4.2.3.tar.gz [root@xymonsvr ~]# cd xymon-4.2.3 #切换目录到xymon-4.2.3 [root@xymonsvr xymon-4.2.3]# #提示符变咯 |
[root@xymonsvr xymon-4.2.3]# ./configure #运行configure,一定要加./ 因为当前目录没有加入至系统的环境变量
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 Xymon toplevel 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] ? #回车应用默认值
(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/hobbit-apache.conf 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 Xymon logfiles [/var/log/xymon] ? #回车应用默认值 What is the name of this host [xymonsvr.contoso.com] ? #回车应用默认值 What is the IP-address of this host [127.0.0.1] ? 192.168.100.2 #输入当前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
|
[root@xymonsvr xymon-4.2.3]# make
…<中间省略>...
Build complete. Now run 'make install' as root
|
[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/hobbit-apache.conf 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/hobbit.sh start'
To view the Hobbit webpages, go to http://xymonsvr.contoso.com/xymon |
[root@xymonsvr ~]# chkconfig httpd on
[root@xymonsvr ~]# chkconfig --list httpd #查看httpd启动状态,可以看到runlevel为on,设定成功 httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off |
[root@xymonsvr ~]# cat /home/xymon/server/etc/hobbit-apache.conf >>/etc/httpd/conf/httpd.conf #添加配置文件
[root@xymonsvr ~]# /etc/init.d/httpd restart #重启服务 Stopping httpd: [ OK ] Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using xymonsvr.contoso.com for ServerName [ OK ] |
[root@xymonsvr ~]# chmod 755 /home/xymon #更改权限
[root@xymonsvr home]# ll –d /home/xymon #查看,可以看到other的权限有读和执行 drwxr-xr-x 8 xymon xymon 4096 Dec 14 16:14 xymon |
[root@xymonsvr ~]# su – xymon #切换到xymon
[xymon@xymonsvr ~]$ cd server [xymon@xymonsvr server]$ ls bin download etc ext hobbit.sh tmp web www [xymon@xymonsvr server]$ ./hobbit.sh start #启动服务端,一定要加./ 原因同前 Hobbit started |
[root@xymonsvr ~]# cd /etc/init.d #进入/etc/init.d
[root@xymonsvr init.d]# wget http://iam8up.com/xymon-initd/hobbit #到网上下一个别人写好的脚本 [root@xymonsvr init.d]# vim hobbit #使用vim打开它编辑,vim不熟悉的同学也可用"nano hobbit" #将以下三行改成如下所示 …<省略>... STARTBIN=hobbit.sh STARTDIR=/home/xymon/server/ USERNAME=xymon …<以下省略>... |
[root@xymonsvr init.d]# chmod 755 hobbit #修改它的权限,让它可执行
[root@xymonsvr init.d]# ln -s /etc/init.d/hobbit /etc/rc3.d/S70hobbit #创建一个软链接(快捷方式)到的启动目录 [root@xymonsvr init.d]# init 6 #重启Server |
<!-- bbwin mode local or central --> <setting name="mode" value="central" /> <setting name="configclass" value="win32" /> |
<setting name="bbdisplay" value=" 192.168.100.2:1984" />
<!-- <setting name="bbdisplay" value="yoursecondbbdisplay:port" />--> <!-- BB Pager Part --> <!--<setting name="usepager" value="false" /> <setting name="bbpager" value=" 192.168.100.2:1984" /> <setting name="bbpager" value=" 192.168.100.2:1984" /> |
# clock_gettime() settings
LIBRTDEF = -lrt |
192.168.100.2 xymonsvr.contoso.com # bbd http://xymonsvr.contoso.com/xymon/
192.168.100.1 dc.contoso.com 192.168.100.254 gw.contoso.com 192.168.100.3 linclt.contoso.com |
page xymon XymonServer
192.168.100.2 xymonsvr.contoso.com # bbd http://xymonsvr.contoso.com/xymon/
page Windows WindowsServer
group DC 192.168.100.1 dc.contoso.com #DNS ldap NOCOLUMNS:files,ports group GW 192.168.100.254 gw.contoso.com # NOCOLUMNS:files
page Linux LinuxServer
192.168.100.3 linclt.contoso.com |
HOST=dc.contoso.com
UP 5m LOAD 15.0 25.0 MEMPHYS 100 101 MEMSWAP 50 80 MEMACT 90 97 PROC svchost 8 9 yellow SVC DNS startup=automatic status=started |