In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Server Load Balancing is a network service device that distributes traffic to multiple CVMs (computing clusters). It can quickly improve the external service capability of the application system through traffic distribution; hide the actual service port to enhance the security of the internal system; by eliminating the service single point of failure, improve the reliability of the application system. Today, I will show you the methods and steps of loading the LVS kernel module.
Schedule CVM:
Two network cards:
Vmnet1 private network: 192.168.80.100
Vmnet2 public network: 192.168.90.100 (the address of the scheduler is the address of the public network port)
-load LVS kernel module--
LVS, which is now part of the Linux kernel, is compiled as an ip_vs module by default and can be invoked automatically if necessary. You can manually load the ip_vs module and view the version information of the ip_vs module on the current system by doing the following
[root@lss ~] # cat / proc/net/ip_vs
Cat: / proc/net/ip_vs: there is no such file or directory
[root@lss ~] # modprobe ip_vs / / load ip_vs module
[root@lss ~] # cat / proc/net/ip_vs / / View ip_vs version information
[root@lss ~] # rpm-ivh / mnt/Packages/ipvsadm-1.27-7.el7.x86_64.rpm / / install management software, no need to start
[root@lss ~] # vi nat.sh
#! / bin/bash
Echo "1" > / proc/sys/net/ipv4/ip_forward
Ipvsadm-C
Ipvsadm-A-t 192.168.90.100 ipvsadm 80-s rr
Ipvsadm-a-t 192.168.90.100 purl 80-r 192.168.80.102 purl 80-m
Ipvsadm-a-t 192.168.90.100 purl 80-r 192.168.80.101 purl 80-m
Ipvsadm-Ln
[root@lss ~] # sh nat.sh
192.168.80.101 server:
Vmnet1 private network: 192.168.80.101
Gateway: 192.168.80.100
[root@lss01 ~] # yum install-y httpd
[root@lss01 ~] # vi / etc/httpd/conf/httpd.conf
ServerName www.aa.com
[root@lss01 ~] # vi / var/www/html/index.html
Server aa
[root@lss01 ~] # service httpd restart
[root@lss01 ~] # vi / etc/sysconfig/network-scripts/ifcfg-ens33
GATEWAY=192.168.80.100
[root@lss01 ~] # service network restart
192.168.80.102 server:
Vmnet1 private network: 192.168.80.102
Gateway: 192.168.80.100
[root@lss02 ~] # yum install-y httpd
[root@lss02 ~] # vi / etc/httpd/conf/httpd.conf
ServerName www.bb.com
[root@lss02 ~] # vi / var/www/html/index.html
Server bb
[root@lss02 ~] # service httpd restart
[root@lss02 ~] # vi / etc/sysconfig/network-scripts/ifcfg-ens33
GATEWAY=192.168.80.100
[root@lss02 ~] # service network restart
Real browser test:
Vmnet1:192.168.80.88
Vmnet2:192.168.90.88
If there is anything else you need to know, you can find our professional technical engineer on the official website. The technical engineer has more than ten years of experience in the industry, so it will be more detailed and professional than the editor's answer. Official website link www.yisu.com
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.