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

自己做电影网站有没有钱赚软文文案案例

自己做电影网站有没有钱赚,软文文案案例,涿州市建设局网站网址是多少,官网网站开发框架环境准备 IPVIP环境客户端192.168.134.174Master192.168.134.170192.168.134.100需要配置nginx负载均衡Backup192.168.134.172192.168.134.100需要配置nginx负载均衡web1服务器192.168.134.171 web2服务器 192.168.134.173 1、首先安装nginx服务器(此处采用yum安装…

环境准备

IPVIP环境
客户端192.168.134.174
Master192.168.134.170192.168.134.100需要配置nginx负载均衡
Backup192.168.134.172192.168.134.100需要配置nginx负载均衡
web1服务器192.168.134.171

web2服务器

192.168.134.173

1、首先安装nginx服务器(此处采用yum安装)

wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
yum install nginx -y

2、修改nginx的配置文件(配置负载均衡)

cd /etc/nginx/conf.d/
vim web.confupstream webPools {server 192.168.134.171;server 192.168.134.173;
}
server {location / {proxy_pass http://webPools;}
}

3、启动nginx

systemctl start nginx

4、修改keepalived配置文件

主节点:
! Configuration File for keepalivedglobal_defs {notification_email {acassen@firewall.locfailover@firewall.locsysadmin@firewall.loc}notification_email_from Alexandre.Cassen@firewall.locsmtp_server 192.168.200.1smtp_connect_timeout 30router_id LVS_DEVEL1
}vrrp_instance VI_1 {state MASTER# nopreemptinterface ens33virtual_router_id 51priority 100advert_int 1authentication {auth_type PASSauth_pass 1111}virtual_ipaddress {192.168.134.100}
}
备节点
修改:state MASTERpriority 80

此时可以实现keepalived的故障切换和nginx负载均衡,但是如果nginx的主服务器出现故障,那么此时无法实现客户端的正常访问,即需要新的配置来实现高可用,因此,利用·vrrp-script(利用VIP漂移实现服务的可用)去监控集群资源。

5、重新修改keepalived配置文件,添加vrrp-script,在实例中还要调用。

主备节点做一样的修改
! Configuration File for keepalivedglobal_defs {notification_email {acassen@firewall.locfailover@firewall.locsysadmin@firewall.loc}notification_email_from Alexandre.Cassen@firewall.locsmtp_server 192.168.200.1smtp_connect_timeout 30router_id LVS_DEVEL1
}
vrrp_script check_nginx {  # 自定义资源监控脚本script "killall -0 nginx"interval 2
}
vrrp_instance VI_1 {state MASTER# nopreemptinterface ens33virtual_router_id 51priority 100advert_int 1authentication {auth_type PASSauth_pass 1111}track_script {check__nginx}virtual_ipaddress {192.168.134.100}
}

6、还可以用脚本检测服务的方法

cat check_#!/bin/bashtotal=$(ps -C nginx --no-header | wc -l)if [ $total -eq 0 ]
thennginx_status=1
elsenginx_status=0
fiexit $nginx_status在keepalived文件中也进行修改vrrp_script check_nginx {#script "killall -0 nginx"script "/etc/keepalived/check_nginx.sh"interval 2
}

7、还有一种使用notify的·方法

写notify.sh脚本#!/bin/bashcase "$1" inmaster)nmap localhost -p 80 | grep "80/tcp open"if [ $? -ne 0 ];thensystemctl start nginxfi;;
backup)nginx_psr=`ps -C nginx --no-header | wc -l`if [ $nginx_psr -ne 0 ];thensystemctl stop nginxfi;;
*)echo "Usage:$0 master|backup";;
esacchmod +x notify.sh  # 给脚本增加执行权限然后在keepalived文件中修改就行,修改下面几个地方
vrrp_script check_nginx {#script "killall -0 nginx"script "/etc/keepalived/check_nginx.sh"interval 2weight -30
}track_script {check_nginx}virtual_ipaddress {192.168.134.100}notify_master "/etc/keepalived/notify.sh master"notify_backup "/etc/keepalived/notify.sh backup"
}

8、测试如下:

在停掉nginx后,仍旧可以正常访问systemctl stop nginx
结果如下:
web test page ,ip is 192.168.134.173 192.168.122.1 
web test page ,ip is 192.168.134.171 192.168.122.1 
web test page ,ip is 192.168.134.173 192.168.122.1 
web test page ,ip is 192.168.134.173 192.168.122.1 
web test page ,ip is 192.168.134.171 192.168.122.1 
web test page ,ip is 192.168.134.171 192.168.122.1
http://www.shuangfujiaoyu.com/news/62130.html

相关文章:

  • 网站域名备案授权书免费收录平台
  • 十大直播电商平台重庆seo排名电话
  • 建设部网站内装修标准西安seo网络优化公司
  • 金融网站开发的意义 论文推广公司
  • 上杭网站免费发布信息的平台
  • oa系统网站建设郑州seo外包平台
  • 做外贸一般去什么网站找客户品牌宣传推广策划方案
  • 有新浪的域名怎么做网站seo的工作内容主要包括
  • 购买一个网址多少钱宁波seo推荐
  • 商务网站开发高级seo优化招聘
  • 手机制作网站软件网络推广的方式有哪些?
  • 中山市做网站专业的软文街官网
  • 成都网站软件定制开发seo提高网站排名
  • 仿 手机 网站模板htmlseo课程培训课程
  • 外贸网站建设加推广可以发广告的平台
  • 非凡网站建设app推广是做什么的
  • wordpress php sqlite太原seo排名外包
  • 门户网站开发建设成本明细谷歌搜索优化
  • 免费建立手机网站收录批量查询
  • 杭州知名的网站建设策划app拉新推广一手接单平台
  • python开发手机网站开发关键词优化技巧有哪些
  • 云服务器怎么做多个网站中小企业网络营销现状
  • 做网站包括什么软件网上有免费的网站吗
  • 长春网站外包小学生班级优化大师
  • 网站建设进度控制广州seo排名外包
  • 大型集团网站建设江苏做网站的公司有哪些
  • 深圳做网站哪家便宜google adwords
  • 用什么语言来做网站竞价托管资讯
  • 2345中国最好的网址站seo模拟点击软件
  • 网站网页制作企html网页制作软件有哪些