• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase
您的位置:首页 > 数据库 >Redis > 64位Windows下安装Redis教程

64位Windows下安装Redis教程

作者: 字体:[增加 减小] 来源:互联网 时间:2017-05-11

通过本文主要向大家介绍了windows redis教程,windows下安装redis,redis安装windows,windows上安装redis,windows7安装redis等相关知识,希望本文的分享对您有所帮助

Redis对于Linux是官方支持的,安装和使用没有什么好说的,普通使用按照官方指导,5分钟以内就能搞定。详情请参考:http://redis.io/download

但有时候又想在windows下折腾下Redis,可以从redis下载页面看到如下提示:
Win64 Unofficial The Redis project does not directly support Windows,
 however the Microsoft Open Tech group develops and maintains
 an Windows port targeting Win64.
</div>

大意就是 Redis官方是不支持windows的,只是 Microsoft Open Tech group 在 GitHub上开发了一个Win64的版本,项目地址是:https://github.com/MSOpenTech/redis

打开以后,可以直接使用浏览器下载,或者git克隆。

可以在项目主页右边找到 zip包下载地址: https://github.com/MSOpenTech/redis/archive/2.8.zip

下载解压,没什么好说的,在解压后的bin目录下有以下这些文件:
redis-benchmark.exe         #基准测试
redis-check-aof.exe         # aof
redis-check-dump.exe        # dump
redis-cli.exe               # 客户端
redis-server.exe            # 服务器
redis.windows.conf          # 配置文件
</div>

当然,还有一个 RedisService.docx 文件,看似是一些启动和安装服务的说明文档,但是照着他的指示来,你就会死的很惨,莫名其妙的死了,不知道原因。
【换机器重新测试后已查明,如果不是Administrator用户,就会出各种问题,服务安装以后启动不了等等问题,应该可以修改服务的属性-->登录用户等选项来修正.】

【如果你安装的windows没有Administrator账户,请参考这篇文章:Windows 7 启用超级管理员administrator账户的N种方法】

网上参考了一些资料,发觉可以使用,也就没有深究,直接拿来主义:

启动脚本如下:
redis-server  redis.windows.conf
</div>

可以将其保存为文件 startup.bat ; 下次就可以直接启动了。
但是在cmd之中执行这行命令之后报错:
D:\Develop\redis-2.8.12>redis-server.exe redis.windows.conf
[7736] 10 Aug 21:39:42.974 #
The Windows version of Redis allocates a large memory mapped file for sharing
the heap with the forked process used in persistence operations. This file
will be created in the current working directory or the directory specified by
the 'dir' directive in the .conf file. Windows is reporting that there is
insufficient disk space available for this file (Windows error 0x70).

You may fix this problem by either reducing the size of the Redis heap with
the --maxheap flag, or by starting redis from a working directory with
sufficient space available for the Redis heap.

Please see the documentation included with the binary distributions for more
details on the --maxheap flag.

Redis can not continue. Exiting.
</div>

根据提示,是 maxheap 标识有问题,打开配置文件 redis.windows.conf ,搜索 maxheap , 然后直接指定好内容即可.
.......
# 
# maxheap <bytes>
maxheap 1024000000
.......
</div>

然后再次启动,OK,成功.
D:\Develop\redis-2.8.12>redis-server  redis.windows.conf
                _._
           _.-``__ ''-._
      _.-``    `.  `_.  ''-._           Redis 2.8.12 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._
 (    '      ,       .-`  | `,    )     Running in stand alone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 6736
  `-._    `-._  `-./  _.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |           http://redis.io
  `-._    `-._`-.__.-'_.-'    _.-'
 |`-._`-._    `-.__.-'    _.-'_.-'|
 |    `-._`-._        _.-'_.-'    |
  `-._    `-._`-.__.-'_.-'    _.-'
      `-._    `-.__.-'    _.-'
          `-._        _.-'
              `-.__.-'

[6736] 10 Aug 22:01:22.247 # Server started, Redis version 2.8.12
[6736] 10 Aug 22:01:22.248 * The server is now ready to accept connections on port 6379
</div>

然后可以使用自带的客户端工具进行测试。
双击打开 redis-cli.exe , 如果不报错,则连接上了本地服务器,然后测试,比如 set命令,get命令:
127.0.0.1:6379> set tiemao http://www.weikejianghu.com
OK
127.0.0.1:6379> get tiemao
"http://www.weikejianghu.com"
127.0.0.1:6379>
</div>

这应该很好理解,连接上了本机的6379端口。

如果需要帮助,可以在 cli窗口中输入 help查看,例如:

127.0.0.1:6379> help
red

分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • Windows下Redis安装配置简单教程
  • Windows下Redis安装配置教程
  • Windows下Redis的安装使用教程
  • Redis教程(六):Sorted-Sets数据类型
  • Redis教程(二):String数据类型
  • Redis教程(一):Redis简介
  • 64位Windows下安装Redis教程

相关文章

  • 2017-05-11超强、超详细Redis数据库入门教程
  • 2017-05-11Redis中主键失效的原理及实现机制剖析
  • 2017-05-11CentOS下Redis数据库的基本安装与配置教程
  • 2017-05-11Redis配置文件详解
  • 2017-05-11Redis教程(十三):管线详解
  • 2017-05-11简单粗暴的Redis数据备份和恢复方法
  • 2017-05-11Redis集合类型的常用命令小结
  • 2017-05-11redis常用命令小结
  • 2017-05-11Redis总结笔记(二):C#连接Redis简单例子
  • 2017-05-11详解用Redis实现Session功能

文章分类

  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase

最近更新的内容

    • Redis String 类型和 Hash 类型学习笔记与总结
    • Redis配置文件详解
    • Redis数据库中实现分布式锁的方法
    • Redis批量删除KEY的方法
    • Redis有序集合类型的常用命令小结
    • 浅谈redis采用不同内存分配器tcmalloc和jemalloc
    • 简介Redis中的showlog功能
    • CentOS Linux系统下安装Redis过程和配置参数说明
    • Redis的Python客户端redis-py安装使用说明文档
    • Redis主从实现读写分离

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有