简单介绍

1,Redis是什么

最直接的还是看官方的定义吧。

Redis is an open source (BSD licensed), in-memory data structure store, used as database, cache and message broker. It supports data structures such as strings, hashes, lists, sets,sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

可以简单总结为:Redis是一个内存存储的数据结构服务器。

2,Redis用来做什么

redis最常见的应用场景是:做分布式缓存

Windows下环境搭建

1,下载Windows版本redis

下载地址:https://github.com/MSOpenTech/redis/releases

2,开启服务端

下载解压后,进入到目录,运行redis-server.exe,可以如下图所示。

clipboard

此时,代表服务端已经启动了,并且开启的是6379端口。

3,使用客户端

同样进入到redis的安装目录,运行程序redis-cli.exe,打开一个客户端,此时等待输入命令。

clipboard[1]

输入一个查找所有key的命令,执行结果如下图。

clipboard[2]

至此,我们已经学会了如何在Windows下开启redis服务和redis客户端,下面我们要学习redis支持的几种数据类型和相关的redis操作命令。。。

参考资料

  1. 官方网站:http://redis.io/
  2. 翻译官方全站:http://www.redis.cn/download.html
  3. Windows版本:https://github.com/MSOpenTech/redis/releases
  4. 命令文档:http://doc.redisfans.com/
  5. 管理工具RedisDesktopManager:https://github.com/uglide/RedisDesktopManager/releases
  6. 一线码农的15天玩转Redis:http://www.cnblogs.com/huangxincheng/category/755864.html
posted on 2015-12-28 15:52  永远的麦子  阅读(613)  评论(0编辑  收藏  举报