Deploying using Redis on Windows

Source: Internet
Author: User
Tags download redis redis desktop manager install redis redis server

Deploying using Redis on Windows

Posted in back end by Keenwon on July 3, 2014 views:28,647

These two days in the company intranet home, the information is obtained from other systems, the product originally intended to directly on the static page, JSONP asynchronous fetch data. But one jsonp comparison pit (has not liked), and secondly, the entire page of data are asynchronously obtained, just open the page will be blank, experience extremely poor. So I decided to use node. js + Express + Redis to make it simple. This morning has been tossing redis, read a lot of articles, may be version or other reasons, I encountered the problem they did not mention, but finally still deployed, the following process to write down for everyone reference.

Download Redis

There are a variety of versions available on the Redis Web page , which I deployed on Windows this time to download on GitHub . The current version of the 2.8.12 , direct decompression, in the \bin\release directory has a compressed package, which is what we need:

Start Redis

Open the Command window directly in the directory, run:

    1. Redis-server Redis. Windows. conf

The result is tragic, hint: QForkMasterInit: system error caught. error code=0x000005af, message=VirtualAllocEx failed.: unknown error . The reason is the memory allocation problem (if your computer is tough enough, it may not be a problem). There are two workarounds, first: Use the --maxmemory command to limit Redis memory when booting:

    1. Redis-server Redis. Windows. Conf --maxmemory 200m

The second method is to modify the configuration file redis.windows.conf :

    1. MaxMemory 209715200

Note that the units are bytes, and the following changes are completed:

Then redis-server redis.windows.conf you can start the operation again:

But the problem again, close the cmd window will turn off Redis, is the server always open? This is obviously unscientific, see below how to deploy on the server.

Deploying Redis

In fact, Redis can be installed as a Windows service, boot from boot, the command is as follows:

    1. Redis-Server -service-install Redis. Windows. conf

Once installed, you can see that Redis is already a Windows service:

However, after installation, Redis does not start, and the Start command is as follows:

    1. Redis-Server -service-start

Stop command:

    1. Redis-Server -service-stop

You can also install multiple instances

  1. Redis-Server -service-Install- service-name RedisService1 – Port 10001
  2. Redis-Server -service-start –service-name RedisService1
  3. Redis-Server -service-Install- service-name RedisService2 – Port 10002
  4. Redis-Server -service-start –service-name RedisService2
  5. Redis-Server -service-Install- service-name RedisService3 – Port 10003
  6. Redis-Server -service-start –service-name RedisService3

Uninstall command:

    1. Redis-Server -service-uninstall

last hint : 2.8 version of the 32-bit system is not supported, 32-bit system to download the 2.6 version . Version 2.6 cannot be deployed as easily as above, it provides a program called Rediswatcher to run Redis Server,redis automatically restarts after stopping.

Also recommended is a Redis visual management tool: Redis Desktop Manager, the official website of the wall, you can download the v0.7.6 version of My network , put a:

Original link: Deploy on Windows using Redis

Deploying using Redis on 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.