1.redis-windows
Recently in doing a snap module, because too ordinary insert and update I/O can't stand, so I had to put things in memory, and so the auction ended, in writing to disk.
Why use Window? Because the server is the window, not the election.
Open the official website to see some not happy things.
Win64 |
Unofficial |
The Redis project does not directly support for Windows, however the Microsoft Open Tech Group develops and maintains an windo WS Port targeting Win64. |
Clone |
Other downloads is available on GitHub, historical downloads is available on Google Code.
Scripts and other automatic downloads can easily access the tarball of the latest Redis stable version ATHTTP://DOWNLOAD.R Edis.io/redis-stable.tar.gz. The source code of the latest stable release is all browsable here, with the file Src/version.h in order to extract the Version in an automatic.
But I went to download it and found that it is not very different from its own, how, how, and let me disgusting is its description of the file makes me very painful,:
Where toFindComplete Redis Documentation?-------------------------------------------This README is just a fast"Quick Start"Document. You canFind Moredetaileddocumentation at http://Redis.ioBuilding Redis--------------Redis can be compiled and used on Linux, OSX, OpenBSD, NetBSD, freebsd.we support big endian and little endian Archit Ectures. It may compile on Solaris derived systems ( forinstance Smartos) but Oursupport forThis platform is"Best effort"And Redis isn't guaranteed towork as well asinchLinux, OSX, and *BSD there. It 's as simple as:% MakeYou can run a +bit Redis binary using:% Make32bitAfter Building Redis is a good idea to test it, using:% Maketestfixing Problems Building +bit binaries ...
Well, anyway, the official also said it is unofficial, does not affect my use is, we should not so hanging!
After downloading, we follow its documentation:
How to build Redis using Visual Studio
You can use the-the free Visual Studio Express-for Windows Desktop Edition available Athttp://www.microsoft.com/en-us/dow nload/details.aspx?id=40787.
Open the solution file Msvs\redisserver.sln in Visual Studio, select a build configuration (Debug or Release) and tar Get (WIN32 or x64) then build.
This should create the following executables in the msvs\$ (Target) \$ (Configuration) Folder:
- Redis-server.exe
- Redis-benchmark.exe
- Redis-cli.exe
- Redis-check-dump.exe
- Redis-check-aof.exe
Compile the version I chose for Release-64bit, as follows:
Find his output directory is generally in the Msvs\x64\release directory, the other non-EXE files are all killed, leaving the following several:
We then take the redis.conf from the compressed package we downloaded and put it in our production directory and open it with a command:
F:\redis-2.8>redis-server.exeredis.conf[9668] -Sep -: ,:31.549#The Windows version of Redis allocates a large memory mappedfile forsharingthe Heap with the forked process usedinchPersistence operations. ThisfileWould be createdinchThe current working directory or the directory specified bythe'Heapdir'directiveinchThe. conffile. Windows is reporting that there isinsufficient disk space available forThisfile(Windows Error0x70). You could fix this problem by either reducing the size of the Redis heap withthe--maxheap flag, or by moving the heapfileTo a local drive with Sufficientspace. please see the documentation included with the binary distributions for Moredetails on the--maxheap and--Heapdir flags. Redis can not continue. Exiting.
As a hint, there is a problem with the maxheap identity because there are fewer configurations in the location file:
We're adding a line to Redis.conf's head.
1024000000
Such as:
# Redis Configurationfileexample# Note on units:when memory size is needed, it's possible to specify# itinchThe usual form of 1k 5GB 4M and so forth:## 1k= +bytes# 1kb=1024x768bytes# 1m=1000000bytes# 1MB=1024x768*1024x768bytes# 1g=1000000000bytes# 1GB=1024x768*1024x768*1024x768bytes## units is Caseinsensitive so 1GB 1Gb 1gB is all the same.################################## includes ############################ ######## Include One or MoreOther config files are here. This is usefulifyou# has a standard template, goes to all Redis server, but also need# to customize a few per-server settings. Include files can include# other files, so use this wisely.## Notice option"include"Won'T is rewritten by command "CONFIG REWRITE"# from Admin or Redis Sentinel. Since Redis always uses the Lastprocessed# Line as value of a configuration directive'd better put includes# at the beginning of thisfileTo avoid overwriting config change at runtime.## If instead is interestedinchusing includes to override configuration# options, it's better to use include as the Lastline.## include/path/to/local.conf# include/path/to/other.conf################################ General #################################### #maxheap1024000000# By default, Redis does not run as a daemon. use'Yes' ifYou need it.# Note that Redis wouldWriteA PIDfile inch/var/run/redis.pid when Daemonized.daemonize no ...
Then start again:
F:\redis-2.8>redis-Server.exe redis.conf _._ _.-``__"'-._ _.-`` `. `_."'-._ Redis2.8. -(00000000/0) -bit.-`` .-```. ```\/ _.,_"'-._ ( ' , .-` | `, ) Running in stand alone mode|`-._`-...-` __...-.``-._|'` _.-'| Port:6379| `-._ `._ / _.-' | pid:9316`-._ `-._ `-./ _.-' _.-'|`-._`-._ `-.__.-' _.-'_.-'|| `-._`-._ _.-'_.-'| http//Redis.io`-._ `-._`-.__.-'_.-'_.-'|`-._`-._ `-.__.-' _.-'_.-'|| `-._`-._ _.-'_.-'| `-._ `-._`-.__.-'_.-'_.-'`-._ `-.__.-' _.-' `-._ _.-'`-.__.-'[9316] -Sep -: -:27.776# Server started, Redis version2.8. -[9316] -Sep -: -:27.776*The server is now a ready to accept connections on port6379
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:
Obviously, brother success, but also wish everyone good luck
Attention:
1. This version is Win64, so 32-bit Windows don't toss it.
2. My operating system is Windows 7 64-bit flagship, running memory 16GB, the user is administrator, if you are not, you may need to set the compatibility permissions in the properties under Redis-server.exe and Redis-cli.exe ( Run as administrator).
3. What 360 Ah, UAC Ah, firewall ah, the shut off please ...
If you don't bother to do it yourself, you can click here: click to download
Installation and use of Redis on Windows