百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

redis-windows

> 数据库
开源

Redis 6.0.20 6.2.18 7.0.15 7.2.8 7.4.3 8.0.0 适用于 Windows

4.1K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Redis 6.0.20 6.2.18 7.0.15 7.2.8 7.4.3 8.0.0 适用于 Windows

Redis for Windows

从官方 Redis 源码为 Windows 编译。

快速开始

cmd
# After download and extract
redis-server.exe redis.conf

# Or use RedisService (recommended)
RedisService.exe run --foreground

使用方法

选项 1:RedisService.exe(推荐)

自动处理路径转换。使用原生 Windows 路径。

cmd
# Run in foreground
RedisService.exe run --foreground --port 6379 --dir C:\redis-data

# Install as Windows service
RedisService.exe install -c C:\config\redis.conf --dir D:\data\redis --port 6379
net start Redis

# Uninstall service
RedisService.exe uninstall

选项 2:Redis-server.exe(直接)

重要: 此构建使用 Cygwin 运行时。命令行路径必须使用 Cygwin 格式。

cmd
# ✅ Correct - Cygwin path format
redis-server.exe /cygdrive/c/config/redis.conf --dir /cygdrive/d/data --port 6379

# ❌ Wrong - Windows paths not supported
redis-server.exe C:\config\redis.conf --dir D:\data

路径转换:

Windows Cygwin
C:\path /cygdrive/c/path
D:\path /cygdrive/d/path
.\data ./data(相对路径可直接使用)

在配置文件中: 使用正斜杠(Windows 风格,使用 /)。

conf
# Recommended in redis.conf
dir C:/redis/data
logfile C:/redis/logs/redis.log

RedisService CLI 参考

…

跨分区/目录

配置、数据和程序可以位于任意位置:

cmd
# Program: C:\redis\RedisService.exe
# Config:  D:\config\redis.conf
# Data:    E:\data\redis

RedisService.exe run -c D:\config\redis.conf --dir E:\data\redis --foreground

数据持久化

数据在关闭时自动保存。RedisService.exe 会正确传递 --dir 参数,确保数据保存到指定目录。

cmd
# Start
RedisService.exe run --foreground --dir C:\redis-data

# Write data
redis-cli SET mykey myvalue

# Graceful shutdown
redis-cli SHUTDOWN

# Restart - data persists
redis-cli GET mykey   # Returns "myvalue"

常见问题

Redis-server.exe 找不到配置文件?

请使用 Cygwin 路径格式:

cmd
redis-server.exe /cygdrive/c/config/redis.conf

或者使用 RedisService.exe,它会自动处理路径转换。

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#redisredis-for-windowsredis-serverredis-windows

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库