1.用root登录主机
2.将redis-3.0.7.tar.gz传送到主机
3.将rubygems-update-2.5.2.gem,redis-3.0.0.gem传送到主机
4.解压redis-3.0.7.tar.gz
5.make , make test, make MALLOC=libc , make install
6.mkdir 7000, mkdir 7001
7.cd 7000

vi redis.conf 添加如下

###################################################
include /home/redis/redis3.0.7/config/redis-common.conf

pidfile /home/redis/redis3.0.7/output/7000/redis7000.pid

cluster-config-file /home/redis/redis3.0.7/output/7000/nodes.conf

port 7000

daemonize yes

cluster-enabled yes

cluster-node-timeout 15000

####################################################

8.cd 7001 ,vi redis.conf 添加如下

#################################################

include /home/redis/redis3.0.7/config/redis-common.conf

pidfile /home/redis/redis3.0.7/output/7001/redis7001.pid

cluster-config-file /home/redis/redis3.0.7/output/7001/nodes.conf

port 7001

daemonize yes

cluster-enabled yes

cluster-node-timeout 15000

##################################################

9.启动redis:
redis-server /home/redis/redis-3.0.7/output/7000/redis.conf

redis-server /home/redis/redis-3.0.7/output/7001/redis.conf

需要等待一段时间然后看进程是否启动 7000,7001端口
ps -ef|grep redis
root 59938 59718 0 12:06 pts/0 00:00:00 grep redis
root 60441 1 0 May29 ? 00:07:39 redis-server *:7000 [cluster]
root 60453 1 0 May29 ? 00:07:31 redis-server *:7001 [cluster]

重复上述操作在其他2台主机上

部署了三台主机后选择其中一台主机把rubygems-update-2.5.2.gem,redis-3.0.0.gem传送到主机
然后升级方式为 gem install rubygems-update-2.5.2.gem ; gem redis-3.0.0.gem

gem install redis-3.0.0.gem

升级完成后 进入redis的src目录,执行下面命令创建集群:
./redis-trib.rb create --replicas 1 192.168.2.249:7000 192.168.2.253:7001 192.168.2.253:7000 192.168.2.254:7001 192.168.2.254:7000 192.168.2.249:7001

附件:redis-common.conf 配置

#####################################################################################################

daemonize yes

tcp-backlog 511

# bind 192.168.1.100 10.0.0.1
# bind 127.0.0.1

timeout 0

# A reasonable value for this option is 60 seconds.
tcp-keepalive 0

# debug (a lot of information, useful for development/testing)
# verbose (many rarely useful info, but not a mess like the debug level)
# notice (moderately verbose, what you want in production probably)
# warning (only very important / critical messages are logged)
loglevel warning

# Specify the log file name. Also the empty string can be used to force
logfile ./redis.log

# To enable logging to the system logger, just set 'syslog-enabled' to yes,
# and optionally update the other syslog parameters to suit your needs.
syslog-enabled yes

# Specify the syslog identity.
# syslog-ident redis

# Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7.
# syslog-facility local0

# Set the number of databases. The default database is DB 0, you can select
# a different one on a per-connection basis using SELECT <dbid> where
# dbid is a number between 0 and 'databases'-1
databases 16

#save 900 1
#save 300 10
#save 60 10000

stop-writes-on-bgsave-error yes

rdbcompression yes

rdbchecksum yes

# The filename where to dump the DB
#dbfilename dump.rdb

# The working directory.
#
# The DB will be written inside this directory, with the filename specified
# above using the 'dbfilename' configuration directive.
#
# The Append Only File will also be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
dir ./

################################# REPLICATION #################################

# slaveof <masterip> <masterport>

# If the master is password protected (using the "requirepass" configuration
# directive below) it is possible to tell the slave to authenticate before
# starting the replication synchronization process, otherwise the master will
# refuse the slave request.
#
# masterauth <master-password>

slave-serve-stale-data yes

slave-read-only yes

repl-diskless-sync no

# repl-ping-slave-period 10

# repl-timeout 60

repl-disable-tcp-nodelay no

# repl-backlog-size 1mb

# repl-backlog-ttl 3600

# It is possible for a master to stop accepting writes if there are less than
# N slaves connected, having a lag less or equal than M seconds.
#
# The N slaves need to be in "online" state.
#
# The lag in seconds, that must be <= the specified value, is calculated from
# the last ping received from the slave, that is usually sent every second.
#
# This option does not GUARANTEE that N replicas will accept the write, but
# will limit the window of exposure for lost writes in case not enough slaves
# are available, to the specified number of seconds.
#
# For example to require at least 3 slaves with a lag <= 10 seconds use:
#
# min-slaves-to-write 3
# min-slaves-max-lag 10
#
# Setting one or the other to 0 disables the feature.
#
# By default min-slaves-to-write is set to 0 (feature disabled) and
# min-slaves-max-lag is set to 10.

################################### LIMITS ####################################

maxclients 10000

maxmemory 64424509440

# volatile-lru -> remove the key with an expire set using an LRU algorithm
# allkeys-lru -> remove any key according to the LRU algorithm
# volatile-random -> remove a random key with an expire set
# allkeys-random -> remove a random key, any key
# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
# noeviction -> don't expire at all, just return an error on write operations
#

maxmemory-policy volatile-lru

# maxmemory-samples 5

############################## APPEND ONLY MODE ###############################

appendonly no

# The name of the append only file (default: "appendonly.aof")

appendfilename "appendonly.aof"

# appendfsync always
#appendfsync everysec
appendfsync no

no-appendfsync-on-rewrite no

auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb

aof-load-truncated yes

################################ LUA SCRIPTING ###############################

lua-time-limit 5000

################################ REDIS CLUSTER ###############################

cluster-enabled yes

cluster-node-timeout 15000

#cluster-slave-validity-factor 10

#cluster-migration-barrier 1

#cluster-require-full-coverage yes

slowlog-log-slower-than 10000

slowlog-max-len 128

latency-monitor-threshold 0

############################# EVENT NOTIFICATION ##############################

notify-keyspace-events ""

############################### ADVANCED CONFIG ###############################

hash-max-ziplist-entries 512
hash-max-ziplist-value 64

list-max-ziplist-entries 512
list-max-ziplist-value 64

set-max-intset-entries 512

zset-max-ziplist-entries 128
zset-max-ziplist-value 64

hll-sparse-max-bytes 3000

activerehashing yes

client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60

aof-rewrite-incremental-fsync yes

redis3.0.7集群部署手册的更多相关文章

  1. redis3.0.5集群部署安装详细步骤

    Redis集群部署文档(centos6系统) (要让集群正常工作至少需要3个主节点,在这里我们要创建6个redis节点,其中三个为主节点,三个为从节点,对应的redis节点的ip和端口对应关系如下) ...

  2. hbase-2.0.4集群部署

    hbase-2.0.4集群部署 1. 集群节点规划: rzx1 HMaster,HRegionServer rzx2 HRegionServer rzx3 HRegionServer 前提:搭建好ha ...

  3. 1--redis3.0.5集群部署安装详细步骤

    Redis集群部署文档(centos6系统) (要让集群正常工作至少需要3个主节点,在这里我们要创建6个redis节点,其中三个为主节点,三个为从节点,对应的redis节点的ip和端口对应关系如下) ...

  4. redis-5.0.5 集群部署

    之前写过一套基于redis-4.0.6版本的测试集群部署 https://www.cnblogs.com/mrice/p/10730309.html 最近生产环境需要部署一套redis-5.0.5版本 ...

  5. Storm1.0.3集群部署

    Storm集群部署 所有集群部署的基本流程都差不多:下载安装包并上传.解压安装包并配置环境变量.修改配置文件.分发安装包.启动集群.查看集群是否部署成功. 1.所有的集群上都要配置hosts vi   ...

  6. redis 3.0的集群部署

    转载请注明出处:http://hot66hot.iteye.com/admin/blogs/2050676 最近研究redis-cluster,正好搭建了一个环境,遇到了很多坑,系统的总结下,等到re ...

  7. (转)redis 3.0的集群部署

    一:关于redis cluster 1:redis cluster的现状 reids-cluster计划在redis3.0中推出,可以看作者antirez的声明:http://antirez.com/ ...

  8. redis3.0.3集群搭建

    redis3.0版本之后支持Cluster,具体介绍redis集群我就不多说,了解请看redis中文简介. 首先,直接访问redis.io官网,下载redis.tar.gz,现在版本3.0.3,我下面 ...

  9. linux下redis4.0.2集群部署(利用Ruby脚本命令)

    一.原生命令方式和Ruby脚本方式区别 利用Ruby脚本部署和用原生命令部署,节点准备的步骤都是一样的,节点启动后的握手,以及主从.槽分配,利用Ruby脚本一步就能完成,利用原生命令需要一步一步地执行 ...

随机推荐

  1. PHP系统左侧菜单栏的管理与实现

    在日常的开发工作中,面对后台的日益增长的业务,以及后期业务的迭代开发,通常会选择添加菜单栏的形式来扩充业务功能,同样日益增长的后台菜单选项也为我们后期的维护,产生了一定的困难性.为此我总结出自己关于左 ...

  2. 接口测试基础(fiddler、postman的使用、python实现测试接口程序)

    写在前面:本文主要的章节规划: 1.什么是接口测试    另外,有的时候会直接调用别的公司的接口,比如银行的.淘宝的.支付宝的,此时也需要做接口测试以及验证数据: 做接口测试的好处:      其中, ...

  3. bzoj 1307/1318 玩具 线段树+记录时间戳

    玩具 Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 743  Solved: 404[Submit][Status][Discuss] Descrip ...

  4. Spring-Security 自定义Filter完成验证码校验

    Spring-Security的功能主要是由一堆Filter构成过滤器链来实现,每个Filter都会完成自己的一部分工作.我今天要做的是对UsernamePasswordAuthenticationF ...

  5. hql语句中的select字句和from 字句

    package com.imooc.model; import java.util.List; import java.util.Map; import org.hibernate.Query; im ...

  6. 用Git的hooks实现项目的自动部署

    https://segmentfault.com/a/1190000003836345?_ea=386770 http://blog.csdn.net/wsyw126/article/details/ ...

  7. MysqL错误之_ERROR! MySQL server PID file could not be found!

    在配置Mysql主从GTID模式下,启动Mysql服务时出现报错,搜索了一番,找到了一个简单可靠的方法,直接成功.如果遇到相同问题没有解决的童鞋,那就去试一下很多其他方案,如,强制杀掉进程重启,修改其 ...

  8. Mysql数据库建立索引的优缺点有哪些?

    索引是对数据库表中一列或多列的值进行排序的一种结构,使用索引可快速访问数据库表中的特定信息. 什么是索引 数据库索引好比是一本书前面的目录,能加快数据库的查询速度. 例如这样一个查询:select * ...

  9. java学习笔记(详细)

    java平台 1.J2SE java开发平台标准版 2.J2EE java开发平台企业版 java程序需要在虚拟机上才可以运行,换言之只要有虚拟机的系统都可以运行java程序.不同系统上要安装对应的虚 ...

  10. MyCat 枚举分片设计思考,查询命中条件

    Mycat多租户实现的两种方式 MyCat,各种分片规则,仅保证插入的时候分片.表关联,join,查询怎么命中分片条件,还是需要设计. 今天稍微测了一下. ER 分片,此方式,插入的时候能分片,但是查 ...