Installing lvs

  
in CentOS

Introduction to lvs
LVS has a similar point to other application-layer or IP-based load balancing applications: one or more load schedulers and several hundred or even hundreds of Real server.

Two lvs installation
2.1 Check if the Load Balancer server supports ipvs. Most Linux distributions have integrated ipvs.

# modprobe -l |  Grep ipvs

If there is output similar to the following, it means the server supports ipvs


2.2 Check if there are necessary dependencies: Kernel-devel, gcc, openssl, openssl-devel, Popt. # rpm -q gcc# rpm -q openssl# rpm -q openssl-devel

# rpm -q popt

# rpm -q kernel-devel
If there is something like the following output, it means the server These dependencies have been installed: if the server output “package ** is not installed", then the package is not installed. You can use yum to install. For example: yum install -y kernel-devel*. 2.3 Installing Static Resource Packs # yum install libnl* libpopt* popt-static -y2.4 Install ipvsadm on the Load Balancer server. Download the ipvsadm software from the official website: (http://www.linuxvirtualserver.org). Check the kernel version. Download the ipvsadm corresponding to the kernel version from the official website. The kernel here is 2.6.32, and the version of ipvsadm that can be downloaded is: ipvsadm-1.26. # rpm -q kernel-develkernel-devel-2.6.32-573.12.1.el6.x86_642.5 Establish the soft chain required for installation. The kernel version and software directory need to be consistent. # rpm -q kernel-develkernel-devel-2.6.32-573.12.1.el6.x86_64# ln -s /usr/src/kernels/2.6.32-573.12.1.el6.x86_64 /usr/src/linux2. 6 Unzip # cd /usr/local/src/lvs# tar zxvf ipvsadm-1.26.tar.gz2.7 Compile and install # cd ipvsadm-1.26# make && make install2.8 If there is no error, the installation is successful. Use the ipvsadm command to verify

# ipvsadm



Copyright © Windows knowledge All Rights Reserved