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 XymonThis script asks a few questions and builds a Makefile to compile XymonChecking your make-utility Checking pre-requisites for building XymonChecking 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/libXymon 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 librtChecking for Large File Support ... Large File Support OKSetting up for a Xymon serverWhat userid will be running Xymon [xymon] ? #回車應用默認值 Found passwd entry for user xymon:x:500:500::/home/xymon:/bin/bashWhere do you want the Xymon installation [/home/xymon] ? #回車應用默認值 OK, will configure to use /home/xymon as the Xymon toplevel directoryWhat 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的IPWhere should I install the Xymon man-pages (/usr/local/man) ? #回車應用默認值 Using Linux Makefile settingsCreated 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:filespage 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 |
[火星人 ] Step by step安裝Xymon伺服器監控系統已經有3674次圍觀