- 浏览: 196966 次
- 性别:
- 来自: 河北
文章分类
最新评论
-
6420285:
你的文章很棒,很多地方讲的通俗易懂,非常感谢。 ...
深入掌握JMS(一):JSM基础 -
xs.cctv:
不错
zeroDateTimeBehavior=convertToNull -
hanyannan0123:
搞不清楚,此话属于经典呢,还是废话。
超类 好 -
czy584521:
```我肯定他用了谷歌金山词霸
IBM的面试官被我忽悠蒙了 -
yuantong:
老板跳槽?什么概念
我们老板跳槽了 !!!
转载于:http://www.itxuexiwang.com/a/shujukujishu/redis/2016/0216/104.html?1455868495
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.
大意就是 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 # 配置文件
当然,还有一个 RedisService.docx 文件,看似是一些启动和安装服务的说明文档,但是照着他的指示来,你就会死的很惨,莫名其妙的死了,不知道原因。
【换机器重新测试后已查明,如果不是Administrator用户,就会出各种问题,服务安装以后启动不了等等问题,应该可以修改服务的属性-->登录用户等选项来修正.】
【如果你安装的windows没有Administrator账户,请参考这篇文章: Windows 7 启用超级管理员administrator账户的N种方法 】
网上参考了一些资料,发觉可以使用,也就没有深究,直接拿来主义:#p#分页标题#e#
启动脚本如下:
代码如下:
redis-server redis.windows.conf
可以将其保存为文件 startup.bat ; 下次就可以直接启动了。
但是在cmd之中执行这行命令之后报错:
代码如下:
D:Developredis-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.
根据提示,是 maxheap 标识有问题,打开配置文件 redis.windows.conf ,搜索 maxheap , 然后直接指定好内容即可.
代码如下:
.......
#
# maxheap <bytes>
maxheap 1024000000
.......
然后再次启动,OK,成功.
代码如下:
D:Developredis-2.8.12>redis-server redis.windows.conf
_._#p#分页标题#e#
_.-``__ ''-._
_.-`` `. `_. ''-._ 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
然后可以使用自带的客户端工具进行测试。
双击打开 redis-cli.exe , 如果不报错,则连接上了本地服务器,然后测试,比如 set命令,get命令:
代码如下:
127.0.0.1:6379> set tiemao http://www.jb51.net
OK
127.0.0.1:6379> get tiemao
" http://www.jb51.net "
127.0.0.1:6379>
这应该很好理解,连接上了本机的6379端口。
如果需要帮助,可以在 cli窗口中输入 help查看,例如:
代码如下:
127.0.0.1:6379> help
redis-cli 2.8.12
Type: "help @<group>" to get a list of commands in <group>
"help <command>" for help on <command>
"help <tab>" to get a list of possible help topics#p#分页标题#e#
"quit" to exit
127.0.0.1:6379> help @string
根据提示,可以输入 help 空格 然后敲tab键,可以像命令提示一样告诉你可以有哪些帮助分组,多敲几个 tab 试试?
备注说明:
1. 这个版本是Win64的,所以32位windows就不要折腾了。
2. 我的操作系统是Windows 7 64位旗舰版,运行内存16GB,用户不是Administrator,而是 hasee,所以设置了下 redis-server.exe 和redis-cli.exe 的属性中的兼容性权限(以管理员身份运行),如果你运行出错,可能需要设置一下这里。
3. 什么360啊,UAC啊,防火墙啊,该关的请关闭。。。
4. 如果有其他问题,欢迎留言或者评论, 这只是一个心血来潮时的折腾
接触了好久Redis但一直没在windows下使用,请轻拍
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.
大意就是 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 # 配置文件
当然,还有一个 RedisService.docx 文件,看似是一些启动和安装服务的说明文档,但是照着他的指示来,你就会死的很惨,莫名其妙的死了,不知道原因。
【换机器重新测试后已查明,如果不是Administrator用户,就会出各种问题,服务安装以后启动不了等等问题,应该可以修改服务的属性-->登录用户等选项来修正.】
【如果你安装的windows没有Administrator账户,请参考这篇文章: Windows 7 启用超级管理员administrator账户的N种方法 】
网上参考了一些资料,发觉可以使用,也就没有深究,直接拿来主义:#p#分页标题#e#
启动脚本如下:
代码如下:
redis-server redis.windows.conf
可以将其保存为文件 startup.bat ; 下次就可以直接启动了。
但是在cmd之中执行这行命令之后报错:
代码如下:
D:Developredis-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.
根据提示,是 maxheap 标识有问题,打开配置文件 redis.windows.conf ,搜索 maxheap , 然后直接指定好内容即可.
代码如下:
.......
#
# maxheap <bytes>
maxheap 1024000000
.......
然后再次启动,OK,成功.
代码如下:
D:Developredis-2.8.12>redis-server redis.windows.conf
_._#p#分页标题#e#
_.-``__ ''-._
_.-`` `. `_. ''-._ 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
然后可以使用自带的客户端工具进行测试。
双击打开 redis-cli.exe , 如果不报错,则连接上了本地服务器,然后测试,比如 set命令,get命令:
代码如下:
127.0.0.1:6379> set tiemao http://www.jb51.net
OK
127.0.0.1:6379> get tiemao
" http://www.jb51.net "
127.0.0.1:6379>
这应该很好理解,连接上了本机的6379端口。
如果需要帮助,可以在 cli窗口中输入 help查看,例如:
代码如下:
127.0.0.1:6379> help
redis-cli 2.8.12
Type: "help @<group>" to get a list of commands in <group>
"help <command>" for help on <command>
"help <tab>" to get a list of possible help topics#p#分页标题#e#
"quit" to exit
127.0.0.1:6379> help @string
根据提示,可以输入 help 空格 然后敲tab键,可以像命令提示一样告诉你可以有哪些帮助分组,多敲几个 tab 试试?
备注说明:
1. 这个版本是Win64的,所以32位windows就不要折腾了。
2. 我的操作系统是Windows 7 64位旗舰版,运行内存16GB,用户不是Administrator,而是 hasee,所以设置了下 redis-server.exe 和redis-cli.exe 的属性中的兼容性权限(以管理员身份运行),如果你运行出错,可能需要设置一下这里。
3. 什么360啊,UAC啊,防火墙啊,该关的请关闭。。。
4. 如果有其他问题,欢迎留言或者评论, 这只是一个心血来潮时的折腾
接触了好久Redis但一直没在windows下使用,请轻拍
发表评论
-
UDF 底层实现
2017-01-04 00:03 663用户自定义函数 继承UDF,重写evaluate方法即可 ... -
MetadataCleaner
2016-12-09 23:09 667MetadataCleaner运行定时任务周期性的清理元数据( ... -
黑马程序员_java08_多线程
2016-03-13 13:01 357转载于:http://www.itxuexiwang.com/ ... -
Redis数据库的安装配置方
2016-02-23 11:27 695转载于:http://www.itxuexiwang.com/ ... -
通过 Redis 实现 RPC 远程方法调用(支持多种编程语
2016-02-23 11:27 756转载于:http://www.itxuexiwang.com/ ... -
CentOS Linux系统下安装Redis过程和配置参数说明
2016-02-28 18:39 516转载于:http://www.itxuexiwang.com/ ... -
NoSQL和Redis简介及Redis在Windows下的安装和使用教程
2016-02-23 11:28 570转载于:http://www.itxuexiwang.com/ ... -
让Redis在你的系统中发挥更大作用的几点建议
2016-03-10 14:06 906转载于:http://www.itxuexiw ... -
Redis主从复制问题和扩容问题的解决思路
2016-02-25 13:26 898转载于:http://www.itxuexiw ... -
Redis中5种数据结构的使用场景介绍
2016-02-25 13:27 619转载于:http://www.itxuexiw ... -
redis中使用redis-dump导出、导入、还原数据实例
2016-02-25 13:26 1199转载于:http://www.itxuexiwang.com/ ... -
Redis批量删除KEY的方法
2016-02-26 17:24 659Redis 中有删除单个 Key 的指令 DEL,但好像没有批 ... -
超强、超详细Redis数据库入门教程
2016-02-28 18:39 473转载于:http://www.itxuexiw ... -
Redis总结笔记(一):安装和常用命令
2016-02-26 17:23 437转载于:http://www.itxuexiw ... -
Redis总结笔记(二):C#连接Redis简单例子
2016-02-26 17:24 626转载于:http://www.itxuexiwang.com/ ... -
redis启动流程介绍
2016-03-10 14:07 545转载于:http://www.itxuexiwang.com/ ... -
redis中使用java脚本实现分布式锁
2016-03-13 13:03 493转载于:http://www.itxuexiwang.com/ ... -
redis常用命令、常见错误、配置技巧等分享
2016-02-26 17:23 441转载于:http://www.itxuexiwang.com/ ... -
Redis操作命令总结
2016-03-10 14:07 507转载于:http://www.itxuexiwang.com/ ... -
Redis数据库的使用场景介绍(避免误用Redis)
2016-03-11 12:12 456转载于:http://www.itxuexiw ...
相关推荐
Windows下安装Redis图文教程。 一篇文章带你快速了解!
^_^Redis是可以安装成windows服务-开机自启http://blog.csdn.net/u010982856/article/details/5165
这里就简单介绍一下Windows下Redis服务的安装方法,希望能够帮到你。 1、要安装Redis,首先要获取安装包。Windows的Redis安装包需要到以下GitHub链接找到。链接:https://github.com/MSOpenTech/redis。打开网站后,...
在Windows环境下java使用Redis代码实例,内含redis在Windows下的详细安装教程及针对String,map,list,set等使用详细的实例!
新版windows的redis6.2.5安装包。如果想要教程,下载之后私聊我即可。
基于redis7.0.5源码。 win11 pro 64bit平台编译。 redis7.0.5 win11版本。
Windows下安装redis以及Linux下通过编译源码安装redis、使用CentOS下yum命令安装、Ubuntu下使用apt命令安装redis超详细、超全面图文教程
注意:由于本人配置redis.conf中的路径使用的是绝对路径,当前redis安装目录的父目录为D:\InstallDir,可以在每个配置文件中修改为自己指定的路径位置 redis638-.conf配置文件内容 #redis服务器端口号 port 6380 #...
redis安装教程,史上最全,没有之一,Windows版的nosql数据库--Redis
linux和windows安装redis-4.0-rc2教程和对应的文件
redis-windows64位。亲测可以,含redis-server、redis.windows、安装教程
windows 安装redis服务端和客户端说明 文档中存在下载地址和需要安装的文件
之前用的redis总是时好时坏,遇到大量写入数据的情况,就会发生运行失灵的去情况,必须重启才行,所以重新上传这个资源 教程地址: https://blog.csdn.net/m_nanle_xiaobudiu/article/details/80448995 有问题可以在...
windows环境下的Redis安装包和安装教程,版本为3.2.10,msi格式安装包及教程,如果有需要的可以下载使用
Redis windows 32bit版本 附带redis.conf 和安装说明
Windows 32位、64位的Redis 的NOSQL 数据库程序
Redis-2.0.2下载地址及在windows下的安装使用教程
一、下载windows版本的Redis ...1.这里下载的是Redis-x64-3.2.100版本,我的电脑是win7 64位,所以下载64位版本的,在运行中输入cmd,然后把目录指向解压的Redis目录。 2、启动命令 redis-server redis.win