RedHat 8.09.0 LVS Installation Manual (2)

xiaoxiao2021-03-06  43

6, give kernel's Source File on Patch:

6.1, using LVS kernel patches

On Linux Virtual Server webpage capture the Patch file of Kernel-2.4.0-20, I caught the following profile: The IPvs Netfilter Module for Kernel 2.4 - Version 1.0.9 - May 21, 2003 (http: // www .linuxvirtualserver.org / software / kernel-2.4 / ipvs-1.0.9.tar.gz)

Obtain ipvs-1.0.9.tar.gz file file

I tried to grab Linux-2.4.20-ipvs-1.0.9.patch.gz file, but never succeeded in compile, so give up.

6.2, unwrite IPvs-1.09.tar.gz, put it in /usr/src/source/iPvs-1.0.9, then in this directory, enter

# make Patchkernel

# make installsource

Load IPVS's Patch into Kernel's Source

6.3, load "hidden" Patch

You can get from http://mail.incredimail.com/howto/lvs/install/src/ (hidden-2.4.20pre10-1.diff) this Patch file, put it in / usr / src / linux directory ,use:

# Cat Hidden-2.4.20pre10-1.diff | Patch -p1

For kernel, thank Alex provides the above PATCH.

Note: Why do you have Hidden's Patch for Kernel, because when DR in LVS is using the IP tunnel, you will need a network card to set two IP situations, but Linux will be after 2.2.14, Eth0: 1 - Noarp This FLAG is close. That is to say, after Kernel 2.2.14, Eth0: 1 is considered an alias of Eth0, any setting of Eth0: 1, also effects in eth0, in other words, I am also against eth0: 1 - Noarp, also will also There is a function of eth0, which will cause the entire network card to receive the package.

In the above two modes, because all the machines are placed in the same network segment, when the Router of the network segment receives the client (Client) TCP Connection requirements for virtual IP (Virtual IP), In the segment, use the ARP Request to ask who has the address of VIP, and contains all the Interface on Director and RealServers (regardless of the primary or subinterface), as long as he has that IP, it will send ARP Reply to go back, causing all the Virtual IP in the network. Take reply to router, the last result is to see who is fast, Router will send the package to who will cause LVS's server, so it is necessary to use Hidden Pattch, hide the Virtual IP on the Subinterface. Get up, this will not be reply to the ARP Request, so you can solve the problem of ARP, and this NOARP problem, the Kernel Development Panel thinks not important, so you will not modify it in the future. Please compile it yourself. In fact, the solution is not only one, I only use a relatively simple one. Source: (http://www.linuxvirtualserver.org/joseph.mack/howto/lvs-howto.arp_problem.html). 7, then install this version of CIPE 1.5.4 (if already installed, remember to remove it first, then use the following rpm), http://mail.incredimail.com/howto/lvs/install/package/ this directory Have. CIPE 1.4.5 cannot be used, because 1.4.5 has bugs, so be sure to determine that the CIPE version is 1.5.4, and must install the CIPE. Otherwise, you can't compile IPvs.

Note: First use rpm -qa | grep cipes to see if there is already a CIPE existence, if there is, use rpm -e CIPE to install it with rpm -ivh cipe-xxx.rpm. Otherwise, it will fail when compiling Kernel modules.

All preparations will come here to a paragraph. Then officially entered the important phase of Compile Kernel.

8, start Compile Kernel,

# CD / USR / SRC / Linux

# Make OldConfig

# (Will read .config information, and ask you some settings for IPvs, all with M answer), press ENTER.

# Make Dep

# Make Modules

# Make Bzimage

I am a little reversed here ... but it doesn't matter ...?

# Make Modules_Install

# make install

9, as for the last make install, if you boot with Lilo, he will give you an error message, but the necessary files have been there, if it is GRUB, there is no problem.

-rw-r - r - 1 root root 129736 July 28 15:51

INITRD-2.4.20-19.8Custom.IMG

LRWXRWXRWX 1 root root 28 July 28 15:58 System.map ->

System.map-2.4.20-19.8custom

-rw-r - r - 1 root root 519383 July 28 15:51

SYSTEM.MAP-2.4.20-19.8CUSTOM-RW-R - R - 1 Root Root 1118581 July 28 15:51

Vmlinuz-2.4.20-19.8custom

10. If you boot with LILO, modify /etc/lilo.conf as follows:

Prompt

TIMEOUT = 350

Boot = / dev / hda

MAP = / boot / map

INSTALL = / boot / boot.b

Message = / boot / message

LBA32

#boptional

Other = / dev / hda1

Optional

Label = WinXP-home

Image = / boot / vmlinuz-2.4.20-18.8

Label = linux_old

Append = "root = label = /"

Read-only

Optional

INITRD = / boot / initrd-2.4.20-18.8.img

Image = / boot / vmlinuz-2.4.20-19.8custom

Label = linux_new

root = / dev / hda5

Append = "devfs = mount"

Read-only

Optional

INitrd = / boot / initrd-2.4.20-19.8custom.img

Because my / is mount under / dev / hda5, you just want to modify it.

If it is turned on with GRUB, he will automatically set it /boot/grub.conf

DEFAULT = 1

TIMEOUT = 10

SplashImage = (HD0, 0) /BOOT/grub/splash.xpm.gz

Title Red Hat Linux (2.4.20-19.8custom)

Root (HD0, 0)

KERNEL /BOOT/VMLINUZ-2.4.20-19.8Custom Ro root = label = /

Initrd /Boot/initrd-2.4.20-19.8custom.img

Title Red Hat Linux (2.4.20-18.8bigmem)

Root (HD0, 0)

KERNEL /BOOT/VMLINUZ-2.4.20-18.8bigmem Ro root = label = /

Initrd /Boot/initrd-2.4.20-18.8bigmem.img

Title Red Hat Linux-SMP (2.4.18-14SMP)

Root (HD0, 0)

Keernel /Boot/Vmlinuz-2.4.18-14smp Ro root = label = /

Initrd /boot/initrd-2.4.18-14smp.img

Title Red Hat Linux-Up (2.4.18-14)

root (HD0, 0)

Kernel /Boot/vmlinuz-2.4.18-14 Ro root = label = /

Initrd /boot/initrd-2.4.18-14.img

11, reboot (Shutdown -i 6 Now)

12. Select Linux_New (Lilo) or Red Hat Linux to turn on, see if there is any error in the boot process. Then check / proc / sys / net / ipv4 / conf / all / hidden exist?

13. If there is no error, install the following RPM

RPM-IPVSADM-1.21-4.i386.rpm

14, the test is entered:

[root @ nbaa boot] # ipvsadmip virtual server version 1.0.9 (size = 65536)

Prot Localaddress: Port Scheduler Flags

-> RemoteadDress: Port Forward Weight ActiveConn Inactconn

The above picture is successful !!!

15. Subsequent actions are in accordance with your network status, to plan, follow-up.

转载请注明原文地址:https://www.9cbs.com/read-62841.html

New Post(0)