Redhat5.8 64-bit LVS instance Environment Description [2]

Source: Internet
Author: User

5. Add shell scripts to the RealServer host

1. Host 192.168.19.62

[[email protected]_Apache ~]# touch /usr/local/sbin/real.sh[[email protected]_Apache ~]# vim /usr/local/sbin/real.sh#!/bin/bashVIP=192.168.19.65. /etc/rc.d/init.d/functionscase "$1" instart)    ifconfig lo:0 $VIP netmask 255.255.255.255 broadcast $VIP    /sbin/route add -host $VIP dev lo:0    echo "1" >/proc/sys/net/ipv4/conf/lo/arp_ignore    echo "2" >/proc/sys/net/ipv4/conf/lo/arp_announce    echo "1" >/proc/sys/net/ipv4/conf/all/arp_ignore    echo "2" >/proc/sys/net/ipv4/conf/all/arp_announce    sysctl -p >/dev/null 2>&1    echo "RealServer Start OK"    ;;stop)    ifconfig lo:0 down    route del $VIP >/dev/null 2>&1    echo "0" >/proc/sys/net/ipv4/conf/lo/arp_ignore    echo "0" >/proc/sys/net/ipv4/conf/lo/arp_announce    echo "0" >/proc/sys/net/ipv4/conf/all/arp_ignore    echo "0" >/proc/sys/net/ipv4/conf/all/arp_announce    echo "RealServer Stoped"    ;;*)    echo "Usage: $0 {start|stop}"    exit 1esacexit 0

The configuration required by the host 192.168.19.62 is shown in the figure (remember to add the execution permission to real. Sh)

[[email protected]_Apache ~]# chmod +x /usr/local/sbin/real.sh

650) This. width = 650; "class =" aligncenter size-full wp-image-405 "alt =" lvs_16 "src =" http://xunbang.org/wp-content/uploads/2013/08/lvs_16.jpg "Height =" 226 "width =" 700 "/>

2. The same method is used on the host 192.168.19.63 and 192.168.19.62. It is not mentioned here. After the configuration is completed, for example:

650) This. width = 650; "class =" aligncenter size-full wp-image-406 "alt =" lvs_17 "src =" http://xunbang.org/wp-content/uploads/2013/08/lvs_17.jpg "Height =" 226 "width =" 700 "/>

3. Configure the VIP on the Windows server and the IIS server used in the cluster.

① Add a hardware device to the control panel, Microsoft loopback adapter, for example:

650) This. width = 650; "class =" aligncenter size-full wp-image-416 "alt =" lvs_18 "src =" http://xunbang.org/wp-content/uploads/2013/08/lvs_18.jpg "Height =" 610 "width =" 636 "/>

 

650) This. width = 650; "class =" aligncenter size-full wp-image-417 "alt =" lvs_19 "src =" http://xunbang.org/wp-content/uploads/2013/08/lvs_19.jpg "Height =" 387 "width =" 499 "/>

② Set the IP address to VIP (192.168.19.65), and the mask is random:

650) This. width = 650; "class =" aligncenter size-full wp-image-418 "alt =" lvs_20 "src =" http://xunbang.org/wp-content/uploads/2013/08/lvs_20.jpg "Height =" 440 "width =" 401 "/>

③ Because zookeeper 255.255 cannot be configured in the attribute, you need to enter the Registry Editor [start → run → cmd press enter and enter Regedit press enter to Open Registry Editor] to modify, search for the VIP Address [Ctrl + F] (192.168.19.65), change the mask to 255.255.255.255, and disable enable NIC (there are two in the window Server 2003 system ).

650) This. length = 650; "Class =" aligncenter size-full wp-image-419 "alt =" lvs_21 "src =" http://xunbang.org/wp-content/uploads/2013/08/lvs_21.jpg "Height =" 560 "width =" 410 "/> 4. This way on 'network neig' check that the IP mask of the corresponding Microsoft loopback adapter is changed to 255.255.255.255.

650) This. width = 650; "class =" aligncenter size-full wp-image-421 "alt =" lvs_23 "src =" http://xunbang.org/wp-content/uploads/2013/08/lvs_23.jpg "Height =" 436 "width =" 401 "/>

Then, configure the IP address under the corresponding site of IIS. You can use the VIP address (192.168.19.65) or 'all unallocated options '. For example:

650) This. width = 650; "class =" aligncenter size-full wp-image-420 "alt =" lvs_22 "src =" http://xunbang.org/wp-content/uploads/2013/08/lvs_22.jpg "Height =" 447 "width =" 465 "/>

⑤ The configuration is complete, and then use:

C: \> Telnet 192.168.19.64 80 and c: \> Telnet 192.168.19.65 80 to check whether the configuration is enabled properly.

This completes the configuration of IIS on Windows server.

 

 

 

 

 

 


Redhat5.8 64-bit LVS instance Environment Description [2]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.