1、在LVS上安裝web和php服務(wù) # yum install httpd php -y 2、在LVS上安裝rrdtool工具 # wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.7.tar.gz # tar zxvf rrdtool-1.4.7.tar.gz # cd rrdtool-1.4.7 # ./configure --prefix=/usr/local/rrdtool # make # make install # cd # echo "/usr/local/rrdtool/lib" >> /etc/ld.so.conf # ldconfig -v 3、下載安裝lvs-rrd # wget http://tepedino.org/lvs-rrd/lvs-rrd-v0.7.tar.gz # tar -zxvf lvs-rrd-v0.7.tar.gz # mv lvs-rrd-v0.7 /var/www/html/lvs # cd /var/www/html/lvs/ 4、修改默認(rèn)配置,主要是些命令的路徑指向 # vim lvs.rrd.update ...... RRDTOOL="/usr/local/rrdtool/bin/rrdtool" IPVSADM="/sbin/ipvsadm" WORKDIR="/var/www/html/lvs/rrd" ...... # vim graph-lvs.sh ...... WORKDIR="/var/www/html/lvs/rrd" RRDTOOL="/usr/local/rrdtool/bin/rrdtool" GRAPHS="/var/www/html/lvs/graphs" WEBPATH="/lvs/graphs" ...... # vim lvs-rrd.php ...... ...... 5、創(chuàng)建rrd繪圖目錄,并修改文件權(quán)限 # mkdir /var/www/html/lvs/rrd chown -R apache lvs/ 6、配置周期收集數(shù)據(jù),并開啟服務(wù) # vim /etc/crontab * * * * * root /var/www/html/lvs/lvs.rrd.update # /etc/init.d/httpd restart # chkconfig httpd on 7、在nagios里設(shè)置監(jiān)控lvs的url ...... define host{ use templete_hangzhou_callcenter host_name hangzhou_server_lvs_master alias hangzhou_server_lvs_master address 192.168.2.231 hostgroups hostgroup_servyou_hosts parents hangzhou_serverswitch_02 icon_p_w_picpath redhat_server.gif icon_p_w_picpath_alt redhat5.0 statusmap_p_w_picpath redhat_server.gd2 parents hangzhou_serverswitch_02 notes_url http://192.168.2.231/lvs #nagios監(jiān)控lvs的url } .....
效果圖:
成都創(chuàng)新互聯(lián)公司專注于沅陵網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠為您提供沅陵?duì)I銷型網(wǎng)站建設(shè),沅陵網(wǎng)站制作、沅陵網(wǎng)頁設(shè)計(jì)、沅陵網(wǎng)站官網(wǎng)定制、重慶小程序開發(fā)公司服務(wù),打造沅陵網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供沅陵網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。