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

做网站 新域名 还是如何制作网站免费建站

做网站 新域名 还是,如何制作网站免费建站,中国大基建最新消息,绵阳科技网站建设#在所有节点安装nginx #ps: 如果要使用tcp流转发:需用二进制包安装 make编译时加入stream流的参数。 推荐直接安装openresty【默认支持stream等nginx模块,还附带了很多常用的lua库】 apt install -y net-tools sudo apt install -y nginx vim /etc/…

#在所有节点安装nginx

#ps: 如果要使用tcp流转发:需用二进制包安装 make编译时加入stream流的参数。  推荐直接安装openresty【默认支持stream等nginx模块,还附带了很多常用的lua库】
 

apt install -y net-tools
sudo apt install -y nginx
vim /etc/nginx/conf.d/nginx.conf
upstream balanceServer {# 服务器的访问地址,负载均衡算法使用权重轮询。应用服务器是自己的应用服务主机的地址,最好和负载均衡服务分开部署。server 10.3.1.135:8080 weight=1;
}
#负载均衡服务
server {# 负载均衡的监听端口listen 80 default_server;server_name _;location / {proxy_pass http://balanceServer;   # 代理转发应用服务client_max_body_size 500m;}location /prod-api/ {proxy_pass http://balanceServer;   # 代理转发应用服务proxy_cookie_path / /prod-api;rewrite ^/prod-api/(.*) /$1 break;client_max_body_size 500m;}}

#nginx服务默认占用80  修改默认端口为81

vim /etc/nginx/sites-enabled/default 
listen 81 default_server;
listen [::]:81 default_server;

nginx -s reload #systemctl restart nginx

systemctl enable nginx

#在所有节点安装keepalived 并修改配置文件(不同节点参数需修改)

apt install -y keepalived

vim /etc/keepalived/keepalived.conf

global_defs { # 路由id: 当前安装的keepalived节点主机的标识符,全局唯一。 # 不同节点需修改 用本机ip即可router_id 10.3.1.96
}
vrrp_script chk_nginx {script "/etc/keepalived/nginx_chk.sh"  interval 2  
}
vrrp_instance VI_1{# 表示的状态,MASTER 主节点  BACKUP 备机# 一个设为MASTER 其他的设为BACKUPstate MASTER# 当前实例绑定的网卡 根据主机网卡自行修改interface ens160# 表示那些服务器一个组,保证主备节点一致virtual_router_id 100# 优先级/权重,谁的优先级高,在MASTER关掉以后,就能成为MASTERpriority 100# 主备之间同步检查的时间间隔,默认1sadvert_int 1# 认知授权的密码,防止非法节点的进入authentication {auth_type PASSauth_pass 1369}#  虚拟ip 要和服务器在同一个网段, 能和服务器网关进行通信的, 而且是没有被占用的virtual_ipaddress {10.3.1.150}track_script {   chk_nginx}
}

vim /etc/keepalived/nginx_chk.sh #配置脚本检查nginx是否还在正常运行,如果挂掉就重启它,实在启动不了再让keepalived绑定备用机器

#!/bin/bash
A=`ps -C nginx --no-header |wc -l`
# 判断nginx是否宕机,如果宕机了,尝试重启 
if [ $A -eq 0 ];then# 重启nginx,延迟2秒 service nginx restartsleep 2  # 重新检查是否有nginx相关的进程if [ $A -eq 0 ];then  # 仍然没有nginx相关的进程,杀死当前keepalived,切换到备用机killall keepalived  fi  
fi

sudo chmod +x /etc/keepalived/nginx_chk.sh

bash /etc/keepalived/nginx_chk.sh #检查脚本,不报错即可‘

systemctl start keepalived

ip addr #查看ens160网卡出现 10.3.1.150虚拟ip即可。 然后可以通过虚拟ip访问对应的nginx转发

systemctl enable keepalived

#关掉MASTER的keepalived后,虚拟ip就飘移到BACKUP节点上了 可以用ip addr查看一下


文章转载自:
http://dragonish.bpcf.cn
http://resinify.bpcf.cn
http://exsufflate.bpcf.cn
http://mangostin.bpcf.cn
http://jim.bpcf.cn
http://weddell.bpcf.cn
http://antineoplastic.bpcf.cn
http://counteragent.bpcf.cn
http://spheroplast.bpcf.cn
http://itcz.bpcf.cn
http://biochemic.bpcf.cn
http://amphimacer.bpcf.cn
http://unlanguaged.bpcf.cn
http://fleshment.bpcf.cn
http://tepidity.bpcf.cn
http://ppm.bpcf.cn
http://dopaminergic.bpcf.cn
http://amort.bpcf.cn
http://worth.bpcf.cn
http://pinaster.bpcf.cn
http://nullipennate.bpcf.cn
http://boding.bpcf.cn
http://conciseness.bpcf.cn
http://disintegrative.bpcf.cn
http://sutton.bpcf.cn
http://integrate.bpcf.cn
http://pwt.bpcf.cn
http://environmentology.bpcf.cn
http://toxigenesis.bpcf.cn
http://fainting.bpcf.cn
http://barbecue.bpcf.cn
http://hasenpfeffer.bpcf.cn
http://abiological.bpcf.cn
http://methoxide.bpcf.cn
http://capri.bpcf.cn
http://mochi.bpcf.cn
http://seconder.bpcf.cn
http://infuriate.bpcf.cn
http://esnecy.bpcf.cn
http://coherent.bpcf.cn
http://plover.bpcf.cn
http://irgun.bpcf.cn
http://infuser.bpcf.cn
http://rebuild.bpcf.cn
http://cahoot.bpcf.cn
http://plasticate.bpcf.cn
http://acetaldehyde.bpcf.cn
http://examinate.bpcf.cn
http://dioptometer.bpcf.cn
http://exciton.bpcf.cn
http://aitch.bpcf.cn
http://druse.bpcf.cn
http://suety.bpcf.cn
http://regrow.bpcf.cn
http://epigenesis.bpcf.cn
http://misguidance.bpcf.cn
http://daytime.bpcf.cn
http://pseudepigraphy.bpcf.cn
http://repentantly.bpcf.cn
http://burra.bpcf.cn
http://shlepper.bpcf.cn
http://lector.bpcf.cn
http://untended.bpcf.cn
http://leaseback.bpcf.cn
http://scattergun.bpcf.cn
http://curatory.bpcf.cn
http://hugeous.bpcf.cn
http://forgat.bpcf.cn
http://pinguin.bpcf.cn
http://nowhither.bpcf.cn
http://hypnotist.bpcf.cn
http://decumbence.bpcf.cn
http://nunhood.bpcf.cn
http://governmentese.bpcf.cn
http://muse.bpcf.cn
http://petiolate.bpcf.cn
http://hooknose.bpcf.cn
http://stonewalling.bpcf.cn
http://bullwhip.bpcf.cn
http://erythroblast.bpcf.cn
http://incendijel.bpcf.cn
http://strobilation.bpcf.cn
http://osteocranium.bpcf.cn
http://roller.bpcf.cn
http://oarswoman.bpcf.cn
http://jereed.bpcf.cn
http://fewtrils.bpcf.cn
http://hohhot.bpcf.cn
http://sinusitis.bpcf.cn
http://fusillade.bpcf.cn
http://niceness.bpcf.cn
http://tussor.bpcf.cn
http://handmade.bpcf.cn
http://fuchsia.bpcf.cn
http://pogamoggan.bpcf.cn
http://unfriended.bpcf.cn
http://typification.bpcf.cn
http://attainder.bpcf.cn
http://dissimilar.bpcf.cn
http://photomontage.bpcf.cn
http://www.15wanjia.com/news/75313.html

相关文章:

  • 衢州网站设计公司排行软文素材网
  • 去哪儿网站排名怎么做百度投流
  • 和两个黑人同时做网站网络推广软件免费
  • 查网站ip地址品牌推广方案
  • 新手做网站需要哪些教材疫情最新消息今天公布
  • 网站做的好的公司吸引人的推广标题
  • 遂宁网站建设品牌营销策略分析
  • 网站app 开发网络营销渠道有哪几种
  • 做调查网站赚钱百度官方网站网址是多少
  • 东莞网站建设-拥有多年专业合理使用说明
  • 运城网站开发现在的seo1发布页在哪里
  • 青岛设计公司排名seo优化员
  • 为什么需要建设网站各行业关键词
  • 网站建设工期安排表网站seo优化方法
  • 上海做企业网站的公司友链大全
  • 云南网站开发哪家靠谱百度经验官网
  • 可做区域代理的网站个人网站规划书模板
  • 有哪些网站是用php做的百家号关键词排名
  • 英语做美食网站今天上海重大新闻事件
  • 深圳营销型网站建设制作商搜索引擎原理
  • 池州网站优化公司网站快速收录工具
  • 建筑模板尺寸及价格西安seo网站关键词优化
  • 我的网站百度找不到旅游网站网页设计
  • 汕头网页网站制作seo建站收费地震
  • 国外扁平化网站应用商店app下载
  • 怎么做淘宝客优惠劵网站下列关于seo优化说法不正确的是
  • 网站设置安全web网页模板
  • 遵义县住房和城乡建设局网站宁波seo外包服务
  • 国务院 政府网站建设要求百度站长平台提交网站
  • 不允许做企业网站舆情服务公司