您好,登錄后才能下訂單哦!
1、在LVS上安裝web和php服務 # 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、修改默認配置,主要是些命令的路徑指向 # 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 ...... <?php header("Cache-Control: max-age=300, must-revalidate"); system("/var/www/html/lvs/graph-lvs.sh -H"); ?> ...... 5、創建rrd繪圖目錄,并修改文件權限 # mkdir /var/www/html/lvs/rrd chown -R apache lvs/ 6、配置周期收集數據,并開啟服務 # vim /etc/crontab * * * * * root /var/www/html/lvs/lvs.rrd.update # /etc/init.d/httpd restart # chkconfig httpd on 7、在nagios里設置監控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監控lvs的url } .....
效果圖:
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。