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

建设工程检测报告查询网站杭州百度推广

建设工程检测报告查询网站,杭州百度推广,飞机选做网站,开什么工作室最稳定前缀参考文章1:Centos7 安装并启动 Redis-6.2.6 前缀参考文章2:Redis 主从复制-服务器搭建【薪火相传/哨兵模式】 管道符查看所有redis进程:ps -ef|grep redis 杀死所有redis进程:killall redis-server 1. 首先修改 redis.conf 配…

前缀参考文章1:Centos7 安装并启动 Redis-6.2.6

前缀参考文章2:Redis 主从复制-服务器搭建【薪火相传/哨兵模式】

管道符查看所有redis进程:ps -ef|grep redis

杀死所有redis进程:killall redis-server

 

1. 首先修改 redis.conf 配置

[root@localhost ~]# cd /usr/local/redis-6.2.6
[root@localhost redis-6.2.6]# vim redis.conf

① 开启 daemonize yes

     此步骤是优化后端启动(启动不会弹出redis图标和大量繁琐信息)

进去编辑命令输入:/daemonize 回车直接跳转它的位置上

     将原先的注释掉,重新编辑开启 daemonize yes

 

② 打开集群模式 :cluster-enabled yes

 

③ 设定节点配置文件名:cluster-config-file nodes-6379.conf

     这个后面要单独配置

 ④ 设定节点失联时间:cluster-node-timeout 15000

      超过该时间(毫秒),集群自动进行主从切换

 

2. 在 cd /usr/local/redis-6.2.6/ 目录下拷贝六个 redis.conf

[root@localhost ~]# cd /usr/local/redis-6.2.6
[root@localhost redis-6.2.6]# vim redis6379.conf

 ① vim redis6379.conf 的编辑内容如下

include /usr/local/redis-6.2.6/redis.conf
pidfile "/var/run/redis_6379.pid"
port 6379
dbfilename "dump6379.rdb"
cluster-config-file nodes-6379.conf

② vim redis6380.conf 的编辑内容如下

 

include /usr/local/redis-6.2.6/redis.conf
pidfile "/var/run/redis_6380.pid"
port 6380
dbfilename "dump6380.rdb"
cluster-config-file nodes-6380.conf

③ vim redis6381.conf 的编辑内容如下

include /usr/local/redis-6.2.6/redis.conf
pidfile "/var/run/redis_6381.pid"
port 6381
dbfilename "dump6381.rdb"
cluster-config-file nodes-6381.conf

④ 如此反复,再编辑 redis6389.conf、redis6390.conf、redis6391.conf

 

端口全部替换命令  :%s/6379/6389

include /usr/local/redis-6.2.6/redis.conf
pidfile "/var/run/redis_6389.pid"
port 6389
dbfilename "dump6389.rdb"
cluster-config-file nodes-6389.conf
include /usr/local/redis-6.2.6/redis.conf
pidfile "/var/run/redis_6390.pid"
port 6390
dbfilename "dump6390.rdb"
cluster-config-file nodes-6390.conf
include /usr/local/redis-6.2.6/redis.conf
pidfile "/var/run/redis_6391.pid"
port 6391
dbfilename "dump6391.rdb"
cluster-config-file nodes-6391.conf

3. 以拷贝的六个文件作为参照启动服务

[root@localhost redis-6.2.6]# redis-server redis6379.conf 
[root@localhost redis-6.2.6]# redis-server redis6380.conf 
[root@localhost redis-6.2.6]# redis-server redis6381.conf 
[root@localhost redis-6.2.6]# redis-server redis6389.conf 
[root@localhost redis-6.2.6]# redis-server redis6390.conf 
[root@localhost redis-6.2.6]# redis-server redis6391.conf

4. 将六个节点合成一个集群

① 组合前,要确保所有redis实例启动后,nodes-xxxx.conf 文件都正常生成

 

② 合体为一个集群

redis-cli --cluster create 192.168.230.128:6379 192.168.230.128:6380 192.168.230.128:6381 192.168.230.128:6389 192.168.230.128:6390 192.168.230.128:6391 --cluster-replicas 1

 

5. 测试集群

[root@localhost redis-6.2.6]# redis-cli -c -p 6379
-c:表示以 集群 方式进入 节点 6379

 

此图可看出,集群成功! 

在节点6379 保存k1:1,计算槽空间为12706,属于节点6381位置,所以保存在节点6381,;

在节点6381 保存k2:2,计算槽空间为449,属于节点6379位置,所以保存在节点6379;

而无论保存在哪个节点的槽空间范围,我都可以在各个节点获取到对应的值。

通过 cluster nodes 命令查看集群信息

http://www.zhongyajixie.com/news/38825.html

相关文章:

  • 网站的建设方案怎么写广州google推广
  • 网站做推广需要什么条件网站做优化一开始怎么做
  • wordpress网站欣赏免费快速网站
  • 汽车配件外贸网站seo快速优化排名
  • 怎么做网络乞丐网站厨师培训机构 厨师短期培训班
  • 大庆建设局网站新网站百度收录
  • wejianzhan是什么网站百度推广客户端
  • 爱给网官网免费素材网站搜索排优化怎么做
  • 江苏环泰建设有限公司网站阿森纳英超积分
  • 网站你懂我意思正能量不用下载视频免费发广告的软件
  • 网站seo的优化怎么做沧州网站运营公司
  • 宝坻网站建设制作百度外推排名
  • 网站如何配置域名深圳网络广告推广公司
  • 聪明的上海网站怎么弄一个网站
  • 做企业网站设网站建设的技术支持
  • 网站链接做二维码郑州seo外包顾问
  • 哪些网站可以接生意做seo教程自学入门教材
  • 南京电子商务网站建设百度应用商店app下载安装
  • 南昌购物网站制作网络推广的具体方式
  • 网站建设百强企业站外推广渠道
  • 织梦做淘宝客网站2022最新新闻素材摘抄
  • 做电源的网站seo关键词排名优化工具
  • 萝岗免费网站建设如何进行营销推广
  • 公司网站建设问题seo排名点击器原理
  • 昆明小程序开发制作公司廊坊seo推广公司
  • 做网站的不足 心得真实有效的优化排名
  • 如何做网站吸引广告商百度一下你就知道搜索引擎
  • 越秀区网站建设公司百度认证
  • 做分类信息网站汕头百度网站排名
  • 做网站怎么存放视频万网注册域名查询