![](https://img-blog.csdnimg.cn/0bd4be8726094ca8a0c4058a3114eca4.jpeg?x-oss-process=image/resize,m_fixed,h_224,w_224)
Redis
Redis
遥遥晚风点点
大数据,java
展开
-
Redis常用操作命令
String127.0.0.1:6379> set name zhangsanOK127.0.0.1:6379> keys *1) "name"127.0.0.1:6379> get name"zhangsan"127.0.0.1:6379> set age 18OK127.0.0.1:6379> get age"18"自增 incr 自减 decr127.0.0.1:6379> incr age(integer) 19127.0.0.1原创 2020-08-23 23:26:00 · 156 阅读 · 0 评论 -
Redis数据类型
Redis中存储数据是通过key-value存储的,对于value的类型有以下几种:String Map<String, String>Hash Map<String, Map<String, String>>List Map<String, List>Set Map<String, HasSet>zSet Map<Stri...原创 2020-08-23 22:45:33 · 127 阅读 · 0 评论 -
java连接redis常用API
Maven依赖<dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.8.1</version></dependency>Stringimport redis.clients.jedis.Jedisobject StringValueDemo2 {原创 2020-08-23 22:38:59 · 369 阅读 · 0 评论 -
Redis安装
1,上传解压[root@linux03 app]# tar -zxvf ./redis-5.0.9.tar.gz -C ./2,进入到安装目录中,编译并安装redismake && make install如果报错的话,说明缺少gcc编译环境安装gcc:yum -y install gcc重新编辑:make MALLOC=libc && make install3,修改配置文件前两步执行完后redis已经安装完成,拷贝red原创 2020-08-23 21:48:02 · 122 阅读 · 0 评论