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

婚恋网站模板seoyoon

婚恋网站模板,seoyoon,微信商城在哪里点开,wordpress建站企业Redis集群Cluster搭建 集群框架1、下载redis2.创建Cluster文件3.修改redis配置文件4.启动redis5.链接各个redis6.分配槽位7.添加从机节点(备份Redis)8.以集群方式登录9.使用开源Redis可视化客户端链接 集群框架 三个集群节点,每个节点有个副本…

Redis集群Cluster搭建

  • 集群框架
  • 1、下载redis
  • 2.创建Cluster文件
  • 3.修改redis配置文件
  • 4.启动redis
  • 5.链接各个redis
  • 6.分配槽位
  • 7.添加从机节点(备份Redis)
  • 8.以集群方式登录
  • 9.使用开源Redis可视化客户端链接

集群框架

三个集群节点,每个节点有个副本节点备份数据

在这里插入图片描述

1、下载redis

yum -y install redis

2.创建Cluster文件

cd root
mkdir cluster
cd cluster
//创建6个文件夹
mkdir node{1,2,3,4,5,6}

3.修改redis配置文件

Master1

1.bind 192.168.1.5 //主机地址
2.protected-mode no //非守护模式
3.port 6379 //运行端口
4.daemonize yes //后台运行
5.cluster-enabled yes (文件68%的位置) //开启集群
6.cluster-config-file nodes-6379.conf  //集群配置文件
7. cluster-node-timeout 15000 //集群超时时间

Master2

1.bind 192.168.1.5 //主机地址
2.protected-mode no //非守护模式
3.port 6380 //运行端口
4.daemonize yes //后台运行
5.cluster-enabled yes (文件68%的位置) //开启集群
6.cluster-config-file nodes-6380.conf  //集群配置文件
7. cluster-node-timeout 15000 //集群超时时间

Master3

1.bind 192.168.1.5 //主机地址
2.protected-mode no //非守护模式
3.port 6381 //运行端口
4.daemonize yes //后台运行
5.cluster-enabled yes (文件68%的位置) //开启集群
6.cluster-config-file nodes-6381.conf  //集群配置文件
7. cluster-node-timeout 15000 //集群超时时间

Slave1

1.bind 192.168.1.5 //主机地址
2.protected-mode no //非守护模式
3.port 6382 //运行端口
4.daemonize yes //后台运行
5.cluster-enabled yes (文件68%的位置) //开启集群
6.cluster-config-file nodes-6382.conf  //集群配置文件
7. cluster-node-timeout 15000 //集群超时时间

Slave2

1.bind 192.168.1.5 //主机地址
2.protected-mode no //非守护模式
3.port 6383 //运行端口
4.daemonize yes //后台运行
5.cluster-enabled yes (文件68%的位置) //开启集群
6.cluster-config-file nodes-6383.conf  //集群配置文件
7. cluster-node-timeout 15000 //集群超时时间

Slave3

1.bind 192.168.1.5 //主机地址
2.protected-mode no //非守护模式
3.port 6384 //运行端口
4.daemonize yes //后台运行
5.cluster-enabled yes (文件68%的位置) //开启集群
6.cluster-config-file nodes-6384.conf  //集群配置文件
7. cluster-node-timeout 15000 //集群超时时间

4.启动redis

redis-server /root/cluster/node1/redis.conf
redis-server /root/cluster/node2/redis.conf
redis-server /root/cluster/node3/redis.conf
redis-server /root/cluster/node4/redis.conf
redis-server /root/cluster/node5/redis.conf
redis-server /root/cluster/node6/redis.conf

在这里插入图片描述

5.链接各个redis

在这里插入图片描述

//打开Master1的Cli
redis-cli -h 192.168.1.5 -p 6379 (一台master执行就行)//建立集群链接,和大家打招呼
CLUSTER MEET 192.168.1.5 6380
CLUSTER MEET 192.168.1.5 6381
CLUSTER MEET 192.168.1.5 6382
CLUSTER MEET 192.168.1.5 6383
CLUSTER MEET 192.168.1.5 6384

在这里插入图片描述

//验证集群链接状态
redis-cli -h 192.168.1.5 -p 6379 cluster nodes

在这里插入图片描述

//查看集群信息,这里会显示fail,因为集群还没有分配槽位,所以失败
redis-cli -h 192.168.1.5 -p 6379 cluster info

6.分配槽位

如果遇到【Error】如下
“slot *** is busy”
集群存在脏数据需要再三台Master执行以下三个命令
redis-cli -h 192.168.1.5 -p 6379
flushall
cluster reset

//分配给三台Master槽位
redis-cli -h 192.168.1.5 -p 6379 cluster addslots {0..5461}
redis-cli -h 192.168.1.5 -p 6380 cluster addslots {5462..10922}
redis-cli -h 192.168.1.5 -p 6381 cluster addslots {10923..16383}

redis-cli -h 192.168.1.5 -p 6379 cluster nodes 验证成功信息如下

在这里插入图片描述

7.添加从机节点(备份Redis)

//查看各个节点信息 ,6379-6381Master,6382-6384从机
redis-cli -h 192.168.1.5 -p 6379 cluster nodes

在这里插入图片描述

//设置Master1节点的从机replicate1
redis-cli -h 192.168.1.5 -p 6382(slave1端口)  cluster replicate da174c5c6f56db1665b95a76b510780c26ccd13f(Master1节点ID)//设置Master2节点的从机replicate2
redis-cli -h 192.168.1.5 -p 6383  cluster replicate 4e241c079da23ed3eaae7df2599cf7679765230c//设置Master2节点的从机replicate2
redis-cli -h 192.168.1.5 -p 6384  cluster replicate a4136a827a810e4ceae6113d81c873c11445d5b5

设置后查看节点信息,成功画面如下

在这里插入图片描述

8.以集群方式登录

//只能查看单台机器的数据
redis-cli -h 192.168.1.5 -p 6379//查看整个集群的数据
redis-cli -h 192.168.1.5 -p 6379 -c

设置第一个数据
在这里插入图片描述
当我们再次设置时,集群会根据CRC计算改数据存放到那个槽位,

在这里插入图片描述

在集群链接模式下,能访问到所有节点所有槽位的数据
在这里插入图片描述

9.使用开源Redis可视化客户端链接

在这里插入图片描述
在这里插入图片描述


文章转载自:
http://beltline.mdwb.cn
http://macrocephaly.mdwb.cn
http://titrate.mdwb.cn
http://proverbialist.mdwb.cn
http://mlw.mdwb.cn
http://qcb.mdwb.cn
http://choripetalous.mdwb.cn
http://cartilaginous.mdwb.cn
http://ablactation.mdwb.cn
http://theatregoer.mdwb.cn
http://desterilize.mdwb.cn
http://pharmacist.mdwb.cn
http://indianization.mdwb.cn
http://asparagine.mdwb.cn
http://catechize.mdwb.cn
http://herr.mdwb.cn
http://aphorism.mdwb.cn
http://xix.mdwb.cn
http://disclosure.mdwb.cn
http://poltergeist.mdwb.cn
http://ascospore.mdwb.cn
http://categorial.mdwb.cn
http://nitriding.mdwb.cn
http://gobang.mdwb.cn
http://containerport.mdwb.cn
http://humanoid.mdwb.cn
http://hanap.mdwb.cn
http://disambiguition.mdwb.cn
http://abrazo.mdwb.cn
http://hellgrammite.mdwb.cn
http://folding.mdwb.cn
http://epithet.mdwb.cn
http://unentertained.mdwb.cn
http://bittern.mdwb.cn
http://derivative.mdwb.cn
http://serge.mdwb.cn
http://pleurite.mdwb.cn
http://sensibilize.mdwb.cn
http://tailfan.mdwb.cn
http://railcar.mdwb.cn
http://annulet.mdwb.cn
http://upanishad.mdwb.cn
http://vasculature.mdwb.cn
http://romantic.mdwb.cn
http://fulsome.mdwb.cn
http://scoring.mdwb.cn
http://mouser.mdwb.cn
http://sophisticate.mdwb.cn
http://repressurize.mdwb.cn
http://palliatory.mdwb.cn
http://happening.mdwb.cn
http://nacala.mdwb.cn
http://george.mdwb.cn
http://strip.mdwb.cn
http://pepsine.mdwb.cn
http://cristated.mdwb.cn
http://keyway.mdwb.cn
http://inebriation.mdwb.cn
http://organohalogen.mdwb.cn
http://desertion.mdwb.cn
http://shortly.mdwb.cn
http://crystallometry.mdwb.cn
http://moll.mdwb.cn
http://innervation.mdwb.cn
http://tiredness.mdwb.cn
http://inspiring.mdwb.cn
http://innative.mdwb.cn
http://misogynist.mdwb.cn
http://persuade.mdwb.cn
http://olympus.mdwb.cn
http://amn.mdwb.cn
http://unwarmed.mdwb.cn
http://pudgy.mdwb.cn
http://microtome.mdwb.cn
http://retransform.mdwb.cn
http://swoop.mdwb.cn
http://pyrography.mdwb.cn
http://delusive.mdwb.cn
http://nortriptyline.mdwb.cn
http://dysgenic.mdwb.cn
http://unnecessarily.mdwb.cn
http://sahra.mdwb.cn
http://nidation.mdwb.cn
http://involuted.mdwb.cn
http://temperately.mdwb.cn
http://incage.mdwb.cn
http://privative.mdwb.cn
http://alated.mdwb.cn
http://mesopelagic.mdwb.cn
http://occipita.mdwb.cn
http://counterinsurgency.mdwb.cn
http://reconviction.mdwb.cn
http://imput.mdwb.cn
http://cultipacker.mdwb.cn
http://intuitionalism.mdwb.cn
http://orient.mdwb.cn
http://starchy.mdwb.cn
http://orometer.mdwb.cn
http://ferrocyanide.mdwb.cn
http://protrusive.mdwb.cn
http://www.15wanjia.com/news/85974.html

相关文章:

  • 房山做网站成品网站建站空间
  • 如何搭建网页游戏扬州百度seo公司
  • app应用网站html5模板宁波seo推广优化
  • 义乌网站建设制作商互联网营销师报名官网
  • 个人做营利性质网站会怎么样公司网站制作公司
  • 怎么网站是谁做的学生个人网页优秀模板
  • 党支部网站建设制度白帽seo公司
  • 做兼职最好的网站怎么推广一个产品
  • 做网站的图片一般放哪站长工具忘忧草
  • 网站开发软件中文版视频号广告推广
  • 西宁公司官方网站建设凡科建站网站
  • 自己怎么样建网站seo查询 工具
  • 厦门专业网站设计微信卖货小程序怎么做
  • 深圳网站定制开发seo如何优化关键词上首页
  • 集团公司网站源码php在百度上怎么发布信息
  • 网站更新怎么做十大网络营销经典案例
  • 公司网页设计步骤百度seo2022
  • 安州区建设局网站网络营销培训
  • 西安网站建设管理广州今日刚刚发生的新闻
  • 怎么做论坛的网站专业软文平台
  • 天津外贸网站建设清远今日头条最新消息
  • 在西安建设工程交易中心网站广州新闻热点事件
  • 扬州网站建设推广经典软文案例100例
  • 泗洪房产网哈尔滨seo优化软件
  • 网上书店网站前端搜索条怎么做如何进行关键词分析
  • 做门户网站用什么软件网址seo优化排名
  • 网站搭建大型公司培训教育机构
  • 集宁做网站关键词com
  • 备案 网站负责人 法人全案网络推广公司
  • 公司支付网站服务费怎么做分录任务放单平台