In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Ipvs installation:
Check whether lvs:lsmod is installed | grep ip_vs (check whether the ipvs module is loaded successfully)
Install lvs
Method 1:
You can install yum directly in the production environment.
# yum install ipvsadm-y
Ipvsadm is a tool for managing ipvs
Method 2:
After keepalived is installed and keepalived is started, ip_vs will automatically install and load
Load the ip_vs module into the kernel
# ipvsadm (this is the command to load the ip_vs module)
# lsmod | grep ip_vs (check whether the ipvs module is loaded successfully
Ipvs's cluster service:
Tcp,udp,ah,esp,ah_esp,stcp
(1) An ipvs host can define multiple cluster service at the same time.
(2) there should be at least one real server on a cluster service:
When defining, specify lvs-type, and lvs scheduler
The usage of ipvsadm:
Manage cluster services:
Ipvsadm-A | E-t | u | f service-address [- s scheduler] [- p [timeout]]
-A: add a cluster
-D: delete the cluster
-E: modify the cluster
-C: clear the cluster
Example: add a lvs cluster
# ipvsadm-A-t 192.168.0.198 80-s rr
-t: follow up with IP and port (in fact, client-oriented VIP)
-s: specify the algorithm
Example: delete a cluster
# ipvsadm-D-t 192.168.50.199pur80
Service-address: cluster IP address
Tcp:-t ip:port
Udp:-u ip:port
Fwm:-f mark
-s scheduler: default is wlc
-p: implements session persistence. The default time is 360 seconds.
Manage the RS in the cluster:
Ipvsadm-a | e-t | u | f service-address-r server-address [- g | I | m] [- w weight]
Example: add a node to the cluster
# ipvsadm-a-t 192.168.0.199virtual 80-r 192.168.0.164purl 80-g
-t: specify which lvs to add RS to
-r: specify the real hosts to join the lvs cluster, and add ports
-g: specify as director rout, and this mode is also the default
Ipvsadm-d-t | u | f service-address-r server-address
Example: delete a node in the cluster
# ipvsadm-d-t 192.168.50.199Viru 80-r 192.168.50.164RV 80
Service-address: real host address
Ip [: port]
Lvs-type:
-gpurgateway.dr (default to this model)
-iRank ipiptide tun
-mlug masquerade.mat.
Clear and view:
Ipvsadm-C
Ipvsadm-L | l [options]
-n:numric, which displays the address port based on the numeric format (InActConn represents the number of calls to the back-end RS)
-c:connection, showing the ipvs connection
# ipvsadm-Lnc / / shows all connections being established, including which backend server to connect to
-- stats: the sum of statistics for all kinds of information
-- rate: rate statistics
-- exact: displays the exact value without unit conversion
Save and reload:
Ipvsadm-R
Ipvsadm-S [- n]
Set zero counter:
Ipvsadm-Z [- t | u | f service-address]
Set the timeout:
Usage:-- set tcp tcpfin udp set connection timeout values
Example: ipvsadm-set 30 5 60
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.