1 Redis Standalone安装

可以参考这篇博文:http://www.cnblogs.com/_popc/p/3684835.html

2 Redis Cluster安装

2.1 环境介绍:

Ubuntu 15.10,9台电脑,3 master,6 slave

2.2 环境准备:

安装ruby

sudo apt-get install ruby

安装Redis Ruby驱动

sudo gem install redis

2.3 修改配置文件

通用配置文件:redis-common.conf

#GENERAL
daemonize yes
tcp-backlog
timeout
tcp-keepalive
loglevel notice
databases
logfile "/home/hadoop/software/cloud/redis-3.0.4/data/redis/redis.log"
dir /home/hadoop/software/cloud/redis-3.0./working_directory
slave-serve-stale-data yes
#slave只读
slave-read-only yes
#not use default
repl-disable-tcp-nodelay yes
slave-priority
#打开aof持久化
appendonly yes
#每秒一次aof写
appendfsync everysec
#关闭在aof rewrite的时候对新的写操作进行fsync
no-appendfsync-on-rewrite yes
auto-aof-rewrite-min-size 64mb
lua-time-limit
#打开redis集群
cluster-enabled yes
#节点互连超时的阀值
cluster-node-timeout
cluster-migration-barrier
slowlog-log-slower-than
slowlog-max-len
notify-keyspace-events ""
hash-max-ziplist-entries
hash-max-ziplist-value
list-max-ziplist-entries
list-max-ziplist-value
set-max-intset-entries
zset-max-ziplist-entries
zset-max-ziplist-value
activerehashing yes
client-output-buffer-limit normal
client-output-buffer-limit slave 256mb 64mb
client-output-buffer-limit pubsub 32mb 8mb
hz
aof-rewrite-incremental-fsync yes

个性化配置文件:redis-6379.conf

#包含通用配置
include /home/hadoop/software/cloud/redis-3.0./redis-common.conf
#监听tcp端口
port
#最大可用内存
maxmemory 10240m
#内存耗尽时采用的淘汰策略:
# volatile-lru -> remove the key with an expire set using an LRU algorithm
# allkeys-lru -> remove any key accordingly 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 allkeys-lru
#aof存储文件
appendfilename "appendonly-6379.aof"
#rdb文件,只用于动态添加slave过程
dbfilename dump-.rdb
#cluster配置文件(启动自动生成)
cluster-config-file nodes-.conf
#部署在同一机器的redis实例,把auto-aof-rewrite搓开,防止瞬间fork所有redis进程做rewrite,占用大量内存
auto-aof-rewrite-percentage -

2.4 每台机器启动redis-server

redis-server redis-.conf

2.5 创建集群

src/redis-trib.rb create --replicas  192.168.1.100: 192.168.1.101: 192.168.1.106: 192.168.1.107: 192.168.1.108: 

192.168.1.109: 192.168.1.103: 192.168.1.104: 192.168.1.105:

2.6 进入Redis命令行测试

redis-cli -c -p 

3 Redis Cluster 命令

参考:http://blog.51yip.com/nosql/1726.html

4 参考文献

4.1 http://hot66hot.iteye.com/blog/2050676/

4.2 http://blog.chinaunix.net/uid-7374279-id-4470290.html

Ubuntu 15.10 下Redis Cluster使用的更多相关文章

  1. Ubuntu 15.10 下Tachyon安装

    1 系统环境 Ubuntu 15.10, Java 1.7, Hadoop 2.6.0 HA, Spark-1.4.0 三台机器 spark-1423-0001: Master, Worker spa ...

  2. Ubuntu 15.10 下Scala 操作Redis Cluster

    1 前言 Redis Standalone,Redis Cluster的安装在前面介绍过,地址:http://www.cnblogs.com/liuchangchun/p/5063477.html,这 ...

  3. Ubuntu 16.04 下Redis Cluster集群搭建

    实际操作如下: 准备工作 版本:4.0.2 下载地址:https://redis.io/download 离线版本:(链接: https://pan.baidu.com/s/1bpwDtOr 密码: ...

  4. Ubuntu 16.04下Redis Cluster集群搭建(官方原始方案)

    前提:先安装好Redis,参考:http://www.cnblogs.com/EasonJim/p/7599941.html 说明:Redis Cluster集群模式可以做到动态增加节点和下线节点,使 ...

  5. Ubuntu 15.10下的WebStorm-11.0.3完美破解

    由于最新的JetBrains 发布了最新版本的IntelliJ IDEA的各个版本,而且更换了注册机的使用方式,这就导致了之前对WebStorm的破解方法不能在使用了.所以我们就必须另寻他法咯.如题, ...

  6. Ubuntu 15.10下droidbox安装使用

    DroidBox是一个动态分析Android代码的的分析工具.其目前的安装环境为:Linux/Unix/MacOSX 下面是安装步骤 一. 安装Android SDK 并添加环境变量 export P ...

  7. Ubuntu 15.10下Qt5的安装实战

    写照篇博客的目的就是因为最近要使用Qt,但是由于本人的系统是Ubuntu的,而网上大部分的讲解全是基于Windows的,所以就花费一些时间总结了一下我的安装过程,当然也是也为了能帮助到更多的博友. 第 ...

  8. 求助下 Ubuntu 15.10(64 位)下安装 pyspider 下的问题 - V2EX

    https://www.v2ex.com/t/279405 求助下 Ubuntu 15.10(64 位)下安装 pyspider 下的问题 - V2EX pip 更新到最新 sudo apt inst ...

  9. ubuntu 15.10 64bit 下 steam无法启动

    首先查看steam日志,在/tmp/dumps/下,以“用户名_output.txt”命名. $ cat /tmp/dumps/liuxu_output.txt Running Steam on ub ...

随机推荐

  1. JavsScript学习---快速排序

    <script type="text/javascript"> /** * “快速排序”的思想很简单,整个排序过程只需要三步: * (1)在数据集之中,找一个基准点 * ...

  2. python基础语法二

    迭代 test = "妹子有种冲我来" #可迭代对象 == 被for进行循环获取 for item in test: print(item) break #练习题: test = ...

  3. PHP为什么有人学不会

    互联网进入到人们生活中的方方面面了,世界首富比尔盖茨多次提到青少年编程,而编程是一种思维习惯的转化. 作为写了10几年程序的人,我听到过一些说编程不好学的抱怨. 从目前见到的数据统计,主要是因为在大学 ...

  4. PHP博大精深,入门容易,精通难,怎么才能真正学好PHP

    基础最重要  (1)熟悉HTML/CSS/JS等网页基本元素,完成阶段可自行制作完整的网页,对元素属性达到熟悉程度  (2)理解动态语言的概念,运做机制,熟悉PHP语法  (3)学习如何将PHP与HT ...

  5. Ubuntu 将其他盘挂载到/home的子目录下

    Ubuntu 14.04 将其他盘挂载到/home的子目录下当安装完Ubuntu系统,由于当时没有注意,分配的分区空间太小.经过一段时间安装了各式各样的软件后,常常会遇到/home目录下空间不够的情况 ...

  6. ORACLE11G R2 RAC的进程启动流程

    简要说明ORACLE11GR2 RAC的进程启动流程: 1.启动流程概览图: 二.RAC启动流程的梳理: 第一层:OHASD 启动:(OHASD派生) 1.CSSDAGENT负责启动CSSD的AGEN ...

  7. leftBarButtonItem 的颜色

    修改系统:leftBarButtonItem, rightBarButtonItem 的颜色 在你需要修改的页面,ViewDidload()方法里面贴上下面代码 self.navigationCont ...

  8. Mybatis的分表实战

    前言: 以前写代码, 关于mysql的分库分表已被中间件服务所支持, 业务代码涉及的sql已规避了这块. 它对扩展友好, 你也不知道到底他分为多少库, 多少表, 一切都是透明的. 不过对于小的团队/工 ...

  9. Unity攻略

    Unity开发VR之Vuforia 本文提供全流程,中文翻译. Chinar 坚持将简单的生活方式,带给世人!(拥有更好的阅读体验 -- 高分辨率用户请根据需求调整网页缩放比例) Chinar -- ...

  10. 第一次Scrum冲刺——Life in CCSU

    一.第一次Scrum任务 首先集体讨论确定全局规划,然后进行切割分工,按照规划实现全部功能.现在基于用户的基本需求做一部分. 二.用户故事 1.用户打开APP,进入登录界面: 2.用户输入账号和密码: ...