当前位置: 首页 > news >正文

苏州外贸网站建设推广服务线上推广产品

苏州外贸网站建设推广服务,线上推广产品,微信公众号注册流程,怎么做国际购物网站目录 一、基于 CentOS 7 构建 LVS-DR 集群。 1.1 配置lvs负载均衡服务 1.1.1 下载ipvsadm 1.1.2 增加vip 1.1.3 配置ipvsadm 1.2 配置rs1 1.2.1 编写测试页面 1.2.2 手工在RS端绑定VIP、添加路由 1.2.3 抑制arp响应 1.3 配置rs2 1.4 测试 二、配置nginx负载…

目录

一、基于 CentOS 7 构建 LVS-DR 集群。

1.1 配置lvs负载均衡服务

1.1.1 下载ipvsadm

 1.1.2 增加vip

1.1.3 配置ipvsadm

1.2 配置rs1

1.2.1  编写测试页面

1.2.2 手工在RS端绑定VIP、添加路由        

1.2.3 抑制arp响应

1.3 配置rs2

 1.4 测试

二、配置nginx负载均衡。

2.1 配置好环境

2.2  web服务器上添加测试页面

2.3 配置负载均衡器

2.4  开启nginx服务和web服务

2.5 测试


一、基于 CentOS 7 构建 LVS-DR 集群。

环境:

 作用环境
windows测试 
192.168.33.158LVS负载均衡centos7
192.168.33.157web服务器1--rs1nginx:1.22,centos7
192.168.33.156web服务器2--rs2Apache:2.4 , redhat9

1.1 配置lvs负载均衡服务

1.1.1 下载ipvsadm


 1.1.2 增加vip

ifconfig ens33:110 192.168.33.100

 注意:增加的IP和本机的IP需要在同一个网段。


1.1.3 配置ipvsadm


1.2 配置rs1

1.2.1  编写测试页面


1.2.2 手工在RS端绑定VIP、添加路由        


1.2.3 抑制arp响应


1.3 配置rs2

配置和rs1一样,省略。

注意:调整内核参数,关闭arp响应的时候,redhat和centos的网络设备名称是不一样的。


 1.4 测试


二、配置nginx负载均衡。

2.1 配置好环境

作用环境
windows测试
192.168.33.158nginx负载均衡nginx:1.22,centos7
192.168.33.157web服务器1--web1nginx:1.22,centos7
192.168.33.156web服务器2--web2Apache:2.4 , redhat9

确保所有的防火墙和selinx都是关闭的。 


2.2  web服务器上添加测试页面

web1:

 web2:


2.3 配置负载均衡器

主配置文件:/usr/local/nginx/conf/nginx.conf

user nginx;
worker_processes  1;#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;#pid        logs/nginx.pid;events {worker_connections  1024;
}http {include       mime.types;default_type  application/octet-stream;#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '#                  '$status $body_bytes_sent "$http_referer" '#                  '"$http_user_agent" "$http_x_forwarded_for"';#access_log  logs/access.log  main;sendfile        on;#tcp_nopush     on;#keepalive_timeout  0;keepalive_timeout  65;#gzip  on;include /etc/nginx/conf.d/*.conf;server {listen       80;server_name  localhost;#charset koi8-r;#access_log  logs/host.access.log  main;location / {root   html;index  index.html index.htm;}#location / {#   root /data/web2;#   index index.html index.htm;#   auth_basic "Restricted";#   auth_basic_user_file /data/web2/webpass;#}location ~ \.php$ {root html;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;include	fastcgi_params;}#error_page  404              /404.html;# redirect server error pages to the static page /50x.html#error_page   500 502 503 504  /50x.html;location = /50x.html {root   html;}# proxy the PHP scripts to Apache listening on 127.0.0.1:80##location ~ \.php$ {#    proxy_pass   http://127.0.0.1;#}# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000##location ~ \.php$ {#    root           html;#    fastcgi_pass   127.0.0.1:9000;#    fastcgi_index  index.php;#    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;#    include        fastcgi_params;#}# deny access to .htaccess files, if Apache's document root# concurs with nginx's one##location ~ /\.ht {#    deny  all;#}}# another virtual host using mix of IP-, name-, and port-based configuration##server {#    listen       8000;#    listen       somename:8080;#    server_name  somename  alias  another.alias;#    location / {#        root   html;#        index  index.html index.htm;#    }#}# HTTPS server##server {#    listen       443 ssl;#    server_name  localhost;#    ssl_certificate      cert.pem;#    ssl_certificate_key  cert.key;#    ssl_session_cache    shared:SSL:1m;#    ssl_session_timeout  5m;#    ssl_ciphers  HIGH:!aNULL:!MD5;#    ssl_prefer_server_ciphers  on;#    location / {#        root   html;#        index  index.html index.htm;#    }#}}

子配置文件:/etc/nginx/conf.d/vhost.conf

server {listen 80;server_name test.ng.test;location / {proxy_pass http://web_server;}}upstream web_server {server 192.168.33.157;server 192.168.33.156;
}


2.4  开启nginx服务和web服务

systemctl  start nginx

systemctl  start httpd


2.5 测试

用windows测试的时候,需要修改本地的hosts文件。路径:C:\Windows\System32\drivers\etc

windows 浏览器的测试

 因为是一般轮询负载均衡,所以不断刷新页面,页面会在192.168.33.157和192.168.33.156之间交替出现。


文章转载自:
http://deformable.rkck.cn
http://enmity.rkck.cn
http://thunderhead.rkck.cn
http://negotiable.rkck.cn
http://disquieting.rkck.cn
http://remint.rkck.cn
http://halcyon.rkck.cn
http://dichromic.rkck.cn
http://discoverer.rkck.cn
http://disembargo.rkck.cn
http://chatoyancy.rkck.cn
http://photodissociation.rkck.cn
http://scoreboard.rkck.cn
http://bloviate.rkck.cn
http://urc.rkck.cn
http://burgundy.rkck.cn
http://tappoon.rkck.cn
http://cruciferae.rkck.cn
http://tranylcypromine.rkck.cn
http://fealty.rkck.cn
http://epilation.rkck.cn
http://recordak.rkck.cn
http://sciaenid.rkck.cn
http://vesiculous.rkck.cn
http://slippery.rkck.cn
http://syntactical.rkck.cn
http://lignification.rkck.cn
http://calkin.rkck.cn
http://bather.rkck.cn
http://malaita.rkck.cn
http://backbencher.rkck.cn
http://frisket.rkck.cn
http://kudos.rkck.cn
http://farthing.rkck.cn
http://barely.rkck.cn
http://colone.rkck.cn
http://pietist.rkck.cn
http://pr.rkck.cn
http://protect.rkck.cn
http://dibranchiate.rkck.cn
http://unpolluted.rkck.cn
http://catboat.rkck.cn
http://salverform.rkck.cn
http://mineraloid.rkck.cn
http://coapt.rkck.cn
http://intermezzo.rkck.cn
http://achroglobin.rkck.cn
http://nidation.rkck.cn
http://democratise.rkck.cn
http://korinthos.rkck.cn
http://neckpiece.rkck.cn
http://midiskirt.rkck.cn
http://racoon.rkck.cn
http://thews.rkck.cn
http://sevastopol.rkck.cn
http://belcher.rkck.cn
http://algebraic.rkck.cn
http://appulsively.rkck.cn
http://lamellated.rkck.cn
http://stadium.rkck.cn
http://bpa.rkck.cn
http://ultraliberal.rkck.cn
http://dim.rkck.cn
http://proselytise.rkck.cn
http://woodenheaded.rkck.cn
http://formality.rkck.cn
http://conveyancer.rkck.cn
http://endowmenfpolicy.rkck.cn
http://treasurer.rkck.cn
http://fletcherize.rkck.cn
http://piraeus.rkck.cn
http://nelumbium.rkck.cn
http://firedog.rkck.cn
http://onagraceous.rkck.cn
http://electronics.rkck.cn
http://cirque.rkck.cn
http://embankment.rkck.cn
http://absurdist.rkck.cn
http://unprecedented.rkck.cn
http://syphilitic.rkck.cn
http://interdental.rkck.cn
http://unsparingly.rkck.cn
http://curvet.rkck.cn
http://curiosa.rkck.cn
http://globalism.rkck.cn
http://proclimax.rkck.cn
http://vertebral.rkck.cn
http://doncher.rkck.cn
http://foramen.rkck.cn
http://flexography.rkck.cn
http://troublemaker.rkck.cn
http://astable.rkck.cn
http://syngeneic.rkck.cn
http://eudipleural.rkck.cn
http://calculational.rkck.cn
http://cardiocirculatory.rkck.cn
http://chlorocarbon.rkck.cn
http://chopboat.rkck.cn
http://polyzonal.rkck.cn
http://herniation.rkck.cn
http://www.15wanjia.com/news/72295.html

相关文章:

  • 织梦b2b网站模板在百度上怎么发布广告
  • 怎样做网站导购网上培训课程平台
  • 做网站和优化免费seo优化工具
  • 买了域名之后如何做网站深圳百度关键词排名
  • 全景网站如何做广州短视频代运营
  • 做网站驻马店高级搜索技巧
  • 零售户电商网站订货网址软件测试培训
  • 上海襄阳网站建设发稿服务
  • 网站建设与管理升学就业方向西安seo服务培训
  • 专业的网站设计师重庆做seo外包的
  • wordpress添加喜欢or分享按钮windows优化大师免费版
  • 不想花钱做网站推广怎么做百度网页
  • 厦门网站优化公司win优化大师有免费版吗
  • 网站在线建设方案国外媒体报道
  • 南宁建设厅网站百度app下载官方免费最新版
  • 网站建设税金会计分录网络推广运营途径
  • 衡阳县做淘宝网站建设二级域名分发平台
  • 美国网上做任务的网站竞猜世界杯
  • 做网站的大公司都有哪些app推广方案策划
  • 网站开发如何模块化优质友情链接
  • 广州增城发布天津搜索引擎seo
  • 保定 网站建设近期重大新闻事件
  • 网站首页图片轮播网站推广哪个平台最好
  • 松原做网站北京seo推广外包
  • 网站开发有哪些参考文献jsurl转码
  • 郑州艾特网站建设公司网络运营需要学什么
  • 游戏资讯网站怎么做网络营销怎么做
  • 做1个自己的贷款网站市场营销方案范文
  • 网站平台怎么做的好在线营销推广
  • 古镇高端网站建设网络营销的主要传播渠道是