Install and set up Redis under Windows

Source: Internet
Author: User
Tags redis download redis version

Author: anchor

Date: August 10, 2014


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 details, please refer to:

Http://redis.io/download


But sometimes you want to toss Redis under Windows, and you can see the following tips from the Redis download page, for example:

Win64unofficialthe Redis Project does not directly support Windows, however the Microsoft Open Tech group develops and Mai Ntains an Windows port targeting Win64.

The main idea is that Redis officially does not support Windows, only Microsoft Open Tech Group has developed a Win64 version number on GitHub, the project address is:

Https://github.com/MSOpenTech/redis

When you open it, you can download it directly from your browser, or Git clone.

Ability to find zip packages 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 folder under the following files:

Redis-benchmark.exe         #基准測试redis-check-aof.exe         # aofredis-check-dump.exe        # dumpredis-cli.exe               # Clientredis-server.exe            # server redis.windows.conf          # configuration file
Of course, another Redisservice.docx file appears to be a description of some startup and installation services, but according to his instructions, you will die very dire, inexplicably dead, do not know the reason.

"Change machine again after testing has been identified, assuming not administrator users, there will be a variety of problems, service installation can not start and so on, should be able to change 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 "

Online reference to some of the information, found to be able to use, also did not delve into, direct take doctrine:

Startup scripts such as the following:

Redis-server  redis.windows.conf
Be able to save it as a file Startup.bat; The next time you can start directly.

However, after executing this command in CMD, the error is:

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 Sharingthe heap with the forked process used in persistence operations. This filewill is created in the current working directory or the directory specified bythe ' dir ' directive in the. conf fi Le. Windows is reporting, there isinsufficient disk space available for this file (Windows Error 0x70).  You could fix this problem by either reducing the size of the Redis heap withthe--maxheap flag, or by starting Redis from a Working directory Withsufficient space available for the Redis heap. The documentation included with the binary distributions for moredetails on the--MAXHEAP flag. Redis can not continue. Exiting.

According to the hint, there is a problem with the Maxheap identity, open the configuration file redis.windows.conf,Search Maxheap, and then you can specify the right content directly.

... #  # # # Maxheap <bytes>maxheap 1024000000 .....
Then start again, OK, success.
D:\develop\redis-2.8.12>redis-server  redis.windows.conf                _._           _.-' __ '-._      _.-'    .  ' _.  ' -._           Redis 2.8.12 (00000000/0) a bit  .-".-".  ' \ \    _.,_ '-._ (    '      ,       .-'  | ',    ) 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 ready to accept C Onnections on Port 6379

You can then use your own client tool for testing.

Double hit Open Redis-cli.exe , assuming no error, then connected to the local server, and then test, for example, set command, get command:

127.0.0.1:6379> set Tiemao http://blog.csdn.net/renfufeiok127.0.0.1:6379> get Tiemao "http://blog.csdn.net/ Renfufei "127.0.0.1:6379>
This should be very well understood, connected to the 6379 port on this machine.

If you need assistance, you can enter help view in the CLI form, such as:

127.0.0.1:6379> helpredis-cli 2.8.12Type: ' Help @<group> ' to get a list of commands in <group>      ' help &L T;command> "For help in <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, like a command prompt to tell you what can be helpful groups, more than a few tab to try?
Remark Description:

1. This version number is Win64, so 32-bit Windows don't toss it.

2. My operating system is the Windows 7 64-bit flagship, the execution 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 ( As an administrator), assuming you perform 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 of the toss
have been in touch with Redis for a long time but haven't used it under Windows, tap.

I am in this group, the group has a large number of master lurking, Welcome to add: Click on the link to increase the group "Redis 2000 people Total Group"


Install and set up Redis under Windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.