redis安装和使用

安装

  这里是在windows环境下的redis安装过程,两种安装方式,都比较简单。
  官方提供的只有linux系统的tar.gz格式的压缩包,windows的需要在github下载。
https://redis.io/
http://www.redis.cn/
https://www.redis.com.cn/
https://www.redis.com.cn/redis-installation.html

msi安装

  1. 下载msi安装文件

    官方提供的只有tar.gz格式压缩包下载,msi需要在github下载
    https://github.com/MicrosoftArchive/redis/releases

  2. 双击运行
  3. 完成安装

zip安装

  1. 下载zip压缩包
  2. 将压缩包解压至你准备安装的路径
  3. 解压完成就是安装完成

使用

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 先进入安装目录
cd <安装目录>

# 启动
# 作为普通软件启动,命令行关闭则关闭
redis-server.exe redis.windows.conf
# 作为服务启动,不跟随命令行
redis-server.exe redis.windows-service.conf

# 客户端连接
redis-cli.exe

# 关闭
redis-server.exe --service-stop