【软件安装与配置】Redis for Windows

1. 下载 Redis

Redis 官方没有直接支持 Windows 的安装程序,但可以使用第三方的 Windows 版本。推荐使用 Memurai 或从 Microsoft archive 提供的 Redis for Windows 下载。

2. 安装 Redis

下载适合 Windows 的安装包,本文以Microsoft archive安装包为例。

  • 下载后双击安装,全选默认即可,记得选择"添加Redis目录到环境变量PATH中"。

3. 启动 Redis

安装完成后,进入到Redis安装目录,通过命令行启动 Redis 服务器。

cmd 复制代码
E:\golang\Redis>redis-server
[36868] 21 Oct 14:47:56.306 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
                _._
           _.-``__ ''-._
      _.-``    `.  `_.  ''-._           Redis 3.0.504 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 36868
  `-._    `-._  `-./  _.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |           http://redis.io
  `-._    `-._`-.__.-'_.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |
  `-._    `-._`-.__.-'_.-'    _.-'
      `-._    `-.__.-'    _.-'
          `-._        _.-'
              `-.__.-'

[36868] 21 Oct 14:47:56.309 # Server started, Redis version 3.0.504
[36868] 21 Oct 14:47:56.310 * The server is now ready to accept connections on port 6379

4. 设置为 Windows 服务(可选)

如果希望 Redis 自动在 Windows 启动时运行,将 Redis 设置为 Windows 服务:

cmd 复制代码
E:\golang\Redis>redis-server --service-start
[57972] 21 Oct 15:04:14.546 # Redis service successfully started.

5. 测试 Redis 连接

使用 redis-cli 来测试 Redis 是否正常运行:

cmd 复制代码
E:\golang\Redis>redis-cli
127.0.0.1:6379> PING
PONG

如果 Redis 正常运行,会返回 PONG。

相关推荐
王道长服务器 | 亚马逊云21 分钟前
帝国CMS + AWS:老牌内容系统的新生之路
服务器·网络·数据库·云计算·aws
李慕婉学姐1 小时前
Springboot的民宿管理系统的设计与实现29rhm9uh(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。
数据库·spring boot·后端
zt1985q1 小时前
本地部署消息代理软件 RabbitMQ 并实现外部访问( Windows 版本 )
运维·服务器·windows·rabbitmq·ruby
烤奶要加冰1 小时前
PyCharm 社区版全平台安装指南
ide·windows·python·pycharm·mac
LB21122 小时前
Redis黑马点评 Feed流
数据库·redis·缓存
姓蔡小朋友3 小时前
SpringDataRedis
java·开发语言·redis
ol木子李lo3 小时前
Doxygen入门指南:从注释到自动文档
c语言·c++·windows·编辑器·visual studio code·visual studio·doxygen
喝杯牛奶丶3 小时前
MySQL隔离级别:大厂为何偏爱RC?
java·数据库·mysql·面试
一 乐3 小时前
二手车销售|汽车销售|基于SprinBoot+vue的二手车交易系统(源码+数据库+文档)
java·前端·数据库·vue.js·后端·汽车
Databend3 小时前
BendSQL v0.30.3 Web UI 功能介绍
数据库