redis-入门篇
来源:互联网 发布:jeeplus 工作流源码 编辑:程序博客网 时间:2024/06/13 02:31
redis安装及使用
<1> 在 Ubuntu 系统安装 Redi 可以使用以下命令:
$sudo apt-get update
$sudo apt-get install redis-server
启动 Redis
$ redis-server
查看 redis 是否启动?
$ redis-cli
以上命令将打开以下终端:
redis 127.0.0.1:6379>
127.0.0.1 是本机 IP ,6379 是 redis 服务端口。现在我们输入 PING 命令。
redis 127.0.0.1:6379> ping
PONG
<2> 调戏 Redis
127.0.0.1:6379> pingPONG127.0.0.1:6379> SET msg "hello world"OK127.0.0.1:6379> RPUSH fruit "apple" "bananan" "cherry"(integer) 3127.0.0.1:6379>
以上 Redis将在数据库中创建一个新的键值对,其中:
键是一个字符串对象 “msg”;
对的值也是一个字符串对象 “hello world”
键是一个字符串对象 “fruit”;
对的值是一个列表对象 包含三个字符串对象,分别由SDS实现。
阅读全文
0 0
- Redis入门篇
- redis入门篇
- redis-入门篇
- Redis详解入门篇
- Redis入门篇
- Redis教程1--入门篇
- 【Redis】——入门篇
- Redis入门
- Redis 入门
- Redis入门
- redis入门
- redis入门
- Redis入门
- Redis入门
- redis 入门
- Redis入门
- Redis入门
- Redis入门
- 使用软引用构建敏感数据的缓存
- tomcat的发布
- 野人部落
- NAN论文解读:Neural Aggregation Network for Video Face Recognition
- 屏幕的一些数据
- redis-入门篇
- 初学acmer--读《算法竞赛入门经典》笔记(二) p25-27
- 阿里云首推音乐变速短视频SDK,上线抖音 freestyle只需1步
- MySQL数据库性能优化之存储引擎选择
- 虚拟化 cpu的ring0 ring1又是什么概念?
- Spring Cloud学习 -- 配置管理
- codeforces 370B Berland Bingo(强势模拟)
- JVM类加载机制(转载)
- Java设计模式-工厂模式