
redis
大漠孤烟BLOG
这个作者很懒,什么都没留下…
展开
-
Redis 编译问题
[root@redis redis]# makecd src && make allmake[1]: 进入目录“/opt/redis/src” CC Makefile.depmake[1]: 离开目录“/opt/redis/src”make[1]: 进入目录“/opt/redis/src” CC adlist.oIn file include...原创 2020-01-18 21:40:40 · 460 阅读 · 0 评论 -
redis 整合SpringMvc
1、使用jedis 进行整合redis 和SpringMvc,项目框架如下:所有的包都在一个工程里,很不好,后续拆分开来进行开发。pom.xml 引入jedis<!-- https://mvnrepository.com/artifact/redis.clients/jedis --> <dependency> <groupId>r...原创 2020-01-06 07:41:20 · 262 阅读 · 0 评论 -
redis 流水笔记 十 集群缩容
什么是集群缩容 ? 说白了就是下线节点,判断该节点上是否有slot,有的进行迁移后并使集群忘记该节点,否则直接忘记该节点。2、步骤如下 1、找到需要下线的节点 2、判断该节点是否有slot,有的进行slot迁移 3、下线节点3、做法?[root@hadoop05 bin]# ./redis-cli -p 8000 cluster nodes8c284...原创 2019-12-17 22:13:21 · 348 阅读 · 0 评论 -
redis 流水笔记 十 集群伸缩 ?
集群伸缩本质:槽 和 数据 在节点之间移动--- 集群扩容 ? 意义: 实现集群的扩容,2. 进行故障转移,更换硬盘主机等。1、 新建一个配置文件,和集群的其他配置文件保持一致。[root@hadoop05 cluster]# sed 's/8000/8006/g' redis-8000.conf > redis-8006.conf[root@hadoop05...原创 2019-12-16 22:03:40 · 110 阅读 · 0 评论 -
redis 集群搭建 九 redis-cli --cluster 集群搭建
1、 使用redis-cli --cluster help 进行安装redis集群。[root@hadoop05 bin]# ./redis-cli --cluster helpCluster Manager Commands: create host1:port1 ... hostN:portN --cluster-replica...原创 2019-12-16 21:03:51 · 712 阅读 · 0 评论 -
redis 流水笔记 八 ruby 安装redis集群
1、ruby 安装[root@hadoop02 redis-client]# yum install ruby 已加载插件:fastestmirror# 查看安装的ruby version[root@hadoop02 redis-client]# ruby -vruby 2.0.0p648 (2015-12-16) [x86_64-linux][root@hadoop02 r...原创 2019-12-09 22:44:21 · 194 阅读 · 0 评论 -
redis 流水笔记 八 集群搭建
? 集群搭建的概念1、节点 在单机上配置集群,7000-7005 端口2、meet cluster meet ip port 命令 如: ./redis-cli -p 7000 cluster meet 127.0.0.1 70013、 指派槽 cluster addslots 0...原创 2019-12-07 13:41:25 · 343 阅读 · 0 评论 -
redis 流水笔记 七 主从复制
1、看官网是解释replication 的At the base of Redis replication (excluding the high availability features provided as an additional layer by Redis Cluster or Redis Sentinel) there is a very simple to use and ...原创 2019-12-01 23:32:01 · 1294 阅读 · 0 评论 -
redis 流水笔记 六 消息订阅
1、 消息订阅2、消息推送相关命令发布消息: 这个一定要先订阅频道,才能发布消息,不然消息会出现错误。#消息未发布成功127.0.0.1:6379> PUBLISH new1 hhhh(integer) 0# 先subscribe 频道,才能发布消息[root@hadoop03 bin]# ./redis-cli 127.0.0.1:637...原创 2019-12-01 09:00:28 · 103 阅读 · 0 评论 -
redis 流水笔记 五 事务
1、什么是事务?一组命令按顺序执行,不保证原子性。MULTI,EXEC,DISCARDandWATCHare the foundation of transactions in Redis. They allow the execution of a group of commands in a single step, with two important guarantee...原创 2019-11-30 19:57:53 · 516 阅读 · 0 评论 -
redis 流水笔记四 持久化
1、 RDB 与 AOF 什么是RDB (redis database) RDB 是一个紧凑型单文件系,时间点表示的redis data。 单个文件便于从灾难快速恢复 启动一个子进程处理备份,不影响主进程写入。 允许快速恢复从大的数据集中,相对于aof。RDB is a very compact single-file ...原创 2019-11-30 17:10:28 · 268 阅读 · 0 评论 -
redis 流水笔记 三 redis.conf
1、 读取redis.conf 配置文件是很值得,能比较直观的了解的redis的运行及一些相关配置,或者出现问题一些解决办法。 设定memeory 的内存单位设定。# Note on units: when memory size is needed, it is possible to specify# it in the usual form of 1k 5GB 4M a...原创 2019-11-30 14:22:07 · 194 阅读 · 0 评论 -
redis 流水笔记 二 使用
1、 redis 默认多少数据库# 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 ...原创 2019-11-30 11:52:14 · 578 阅读 · 0 评论 -
redis 流水笔记 一 单机安装
1、官网下载 下载地址:redis 5.0.72、上传到centos 7[root@hadoop03 opt]# mkdir redis#从本机上传bogon:Downloads fandong$ scp redis-5.0.7.tar.gz root@hadoop03.fandong.com:/opt/redisroot@hadoop03.fandong.com...原创 2019-11-30 09:45:14 · 136 阅读 · 0 评论