This article focuses on the 64-bit installation of Redis Tutorial under Windows, this article uses a Win64 version of Redis developed by Microsoft Open Tech Group on GitHub, and the friends you need can refer to the following
Redis is officially supported for Linux, there is nothing to say about installation and use, and normal use is under official guidance and can be done within 5 minutes. For more information, please refer to: http://redis.io/download
But sometimes you want to toss Redis under Windows, you can see the following tips from the Redis download page:
Copy CodeThe code is as follows:
Win64 unofficial The Redis project does not directly support Windows,
However the Microsoft Open Tech Group develops and maintains
An Windows port targeting Win64.
The main idea is that Redis officially does not support windows, but Microsoft Open Tech Group has developed a Win64 version on GitHub with the project address: Https://github.com/MSOpenTech/redis
When you open it, you can download it directly from your browser, or Git clone.
You can find the zip package on the right side of the project homepage: https://github.com/MSOpenTech/redis/archive/2.8.zip
Download unzip, there is nothing to say, in the extracted bin directory under the following these files:
Copy CodeThe code is as follows:
Redis-benchmark.exe #基准测试
Redis-check-aof.exe # AOF
Redis-check-dump.exe # Dump
Redis-cli.exe # Client
Redis-server.exe # Server
REDIS.WINDOWS.CONF # configuration file
Of course, there is a Redisservice.docx file, which appears to be a description of some startup and installation services, but according to his instructions, you will die very miserable, inexplicably dead, do not know the reason.
"After the machine re-test has been identified, if not administrator users, there will be a variety of problems, service installation can not start and so on, you should be able to modify the properties of the service--login users and other options to fix."
"If you installed Windows without a administrator account, please refer to this article: N ways to enable the Super Administrator administrator account in Windows 7"
The online reference of some information, found that can be used, there is no drill, direct take doctrine:
The startup script is as follows:
Copy CodeThe code is as follows:
Redis-server redis.windows.conf
It can be saved as a file startup.bat; The next time you can start directly.
However, after executing this command in CMD, the error is:
Copy CodeThe code is as follows:
D:\develop\redis-2.8.12>redis-server.exe redis.windows.conf
[7736] 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
'll be created in the working directory or the directory specified by
The ' dir ' directive in the. conf file. Windows is reporting this there is
Insufficient disk space available for this file (Windows error 0x70).
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.
As a hint, there is a problem with the Maxheap identity, open the profile redis.windows.conf, search for maxheap, and then directly specify the good content.
Copy CodeThe code is as follows:
.......
#
# Maxheap <bytes>
Maxheap 1024000000
.......
Then start again, OK, success.
Copy CodeThe code is as follows:
D:\develop\redis-2.8.12>redis-server redis.windows.conf
_._
_.-' __ '-._
_.-`` `. `_. "-._ Redis 2.8.12 (00000000/0)
.-`` .-```. ' \ \ _.,_ '-._
(',.-' | ',) Running in Stand alone mode
| '-._ '-...-' __...-. '-._| ' ' _.-' | port:6379
| '-._ '. _/_.-' | pid:6736
'-._ '-._ '-./_.-' _.-'
| '-._ '-._ '-.__.-' _.-' _.-' |
| '-._ '-._ _.-' _.-' | Http://redis.io
'-._ '-._ '-.__.-' _.-' _.-'
| '-._ '-._ '-.__.-' _.-' _.-' |
| '-._ '-._ _.-' _.-' |
'-._ '-._ '-.__.-' _.-' _.-'
'-._ '-.__.-' _.-'
'-._ _.-'
'-.__.-'
[6736] 22:01:22.247 # Server started, Redis version 2.8.12
[6736] 22:01:22.248 * The server is now a ready-to-accept connections on port 6379
You can then use your own client-side tools for testing.
Double hit Open Redis-cli.exe, if not error, then connected to the local server, and then test, such as the SET command, get command:
Copy CodeThe code is as follows:
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>
This should be well understood, connected to the 6379 port on this machine.
If you need assistance, you can enter help view in the CLI window, for example:
Copy CodeThe code is as follows:
127.0.0.1:6379> Help
REDIS-CLI 2.8.12
Type: ' Help @<group> ' to get a list of commands in <group>
"Help <command>" to help on <command>
"Help <tab>" to get a list of possible Help topics
"Quit" to exit
127.0.0.1:6379> Help @string
According to the prompt, you can enter help space and then hit the TAB key, you can like a command prompt to tell you what can be helpful groups, more than a few tab to try?
Remark Description:
1. This version is Win64, so 32-bit Windows don't toss it.
2. My operating system is the Windows 7 64-bit flagship, running memory 16GB, the user is not administrator, but Hasee, so set the next Redis-server.exe and Redis-cli.exe properties in the compatibility permissions ( Run as administrator), if you run an error, you may need to set up here.
3. What 360 Ah, UAC Ah, firewall ah, the shut off please ...
4. If there are other questions, please leave a message or comment, this is just a whim when the toss
have been in touch with Redis for a long time but haven't used it under Windows, tap.
64-bit Redis tutorial under installation in Windows