Install Redis tutorial under 64-bit Windows _redis

Source: Internet
Author: User
Tags documentation redis redis download redis version zip install redis redis tutorial


Redis for Linux is officially supported by the installation and use of nothing to say, ordinary use according to official guidance, can be done within 5 minutes. For more information please refer to: http://redis.io/download



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


Copy Code code 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.





Redis officially does not support Windows, only Microsoft Open Tech Group has developed a Win64 version on GitHub, the project address is: Https://github.com/MSOpenTech/redis



When you open it, you can download it directly using the browser, or git cloning.



The ZIP package download address can be found on the right side of the project home page: Https://github.com/MSOpenTech/redis/archive/2.8.zip



Download decompression, there is nothing to say, in the unpacked Bin directory under the following files:


Copy Code code as follows:

Redis-benchmark.exe #Benchmarks
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 also a redisservice.docx file, looks like some startup and installation of service documentation, but according to his instructions, you will die very miserable, inexplicably dead, do not know why.
"Change machine after testing has been identified, if not administrator users, will have a variety of problems, service installation can not start after the problem, you should be able to modify the properties of the service--> login users and other options to amend."



"If you have installed Windows without an administrator account, refer to this article:" N-way to enable the Super Admin administrator account in Windows 7 "



Online reference Some information, found that can be used, there is no further, direct copycat:



The startup script is as follows:


Copy Code code as follows:

Redis-server redis.windows.conf





It can be saved as a file startup.bat; The next time it can be started directly.
However, in the cmd execution of this line of command after the error:


Copy Code code as follows:

D:\develop\redis-2.8.12>redis-server.exe redis.windows.conf
[7736] 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
Would be created in the current 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).


You'll fix this problem by either reducing the size of the Redis heap with
The--MAXHEAP flag, or by starting Redis to working directory with
Sufficient space available for the Redis heap.

Please, the documentation included with the binary distributions
Details on the--MAXHEAP flag.

Redis can not continue. Exiting.





According to the hint, is the maxheap identification problem, open the configuration file redis.windows.conf, search Maxheap, and then directly specify the good content.


Copy Code code as follows:

.......
#
# Maxheap <bytes>
Maxheap 1024000000
.......





Then start again, OK, success.


Copy Code code as follows:

D:\develop\redis-2.8.12>redis-server redis.windows.conf
_._
_.-``__ ''-._
_.-``    `.  `_. "'-._ Redis 2.8.12 (00000000/0) bit
.-`` .-```. ```\/    _.,_ ''-._
(    '      ,       .-`  | `,    ) Running in Stand alone mode
|`-._`-...-` __...-.``-._|'     ` _.-'| port:6379
|     `-._   `._    /     _.-'    | pid:6736
`-._    `-._  `-./  _.-'    _.-'
|`-._`-._    `-.__.-'    _.-'_.-'|
|           `-._`-._        _.-'_.-'    | Http://redis.io
`-._    `-._`-.__.-'_.-'    _.-'
|`-._`-._    `-.__.-'    _.-'_.-'|
| `-._`-._        _.-'_.-'    |
`-._    `-._`-.__.-'_.-'    _.-'
`-._    `-.__.-'    _.-'
`-._        _.-'
`-.__.-'





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






You can then test with your own client tools.
Double hit Open redis-cli.exe, if not the error, then connect to the local server, and then test, such as set command, get command:


Copy Code code 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 and connected to the 6379 port on this machine.



If you need assistance, you can enter help viewing in the CLI window, for example:





Copy Code code 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>" 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 prompts, you can enter a help space and then hit the TAB key, you can like a command prompt to tell you what can be helped to group, a few more keystrokes to try?
Note notes:



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



2. My operating system is the Windows 7 64-bit flagship, run memory 16GB, the user is not administrator, but Hasee, so set the next Redis-server.exe and Redis-cli.exe properties of the compatibility permissions ( Run as an administrator, you may need to set this up if you run an error.



3. What 360 Ah, UAC Ah, firewall ah, the shutdown please close ...



4. If there are other questions, please leave a message or comment, this is just a whim when the toss



Contact for a long time redis but has not been used under Windows, please tap.


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.