Configuration of redis3.0 cluster on Windows

Source: Internet
Author: User
Tags install redis

1. Installing Redis
Version: win-3.0.501
Https://github.com/MSOpenTech/redis/releases page has, I downloaded the zip version of: Redis-x64-3.0.501.zip; it is best to also download the source code of the ZIP package.


Unzip Redis, such as extract to D:\rediscluster\redis (no folders inside the package)


2. Install Ruby


Http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.2.4-x64.exe


This is where Ruby is installed in the C:\Ruby22-x64 directory.


3. Installing the Redis Ruby Library
Execute command:

[HTML]View PlainCopy
    1. Gem Install Redis



Here our Chinese users may be wall down, unable to connect to the server, from other people's articles found a usable source, the steps to modify the source are as follows:
1. Delete the original source
Use the Gem Sources command to view an existing source, and then use the: Gem source-r http://rubygems.org/command to delete all original sources, http://rubygems.org/is the address of the source listed by the Gem Sources command, Make sure the source is all erased.
2. Add a new Source:

[HTML]View PlainCopy
    1. Gem Source-a http://production.s3.rubygems.org.s3.amazonaws.com/

Another way is to install locally, I go to https://rubygems.org/gems/Redis/versions/3.3.0 download the gem file, and then execute the command:

[HTML]View PlainCopy
    1. Gem Install--local Path_to_gem/filename.gem

, the website can be accessed, but download not, I use goagent only download down.

http://production.s3.rubygems.org.s3.amazonaws.com/This source is OK, can use haha
3. Execute again: Gem install Redis so that's fine.


4. Configure Redis Node
Establish the first redis.7000.conf file (service port 7000), configured as follows:


Redis.7000.conf

[HTML]View PlainCopy
    1. PORT 7000  
    2. appendonly yes   
    3. appendfilename  "appendonly.7000.aof"   
    4. cluster-enabled  yes  
    5. CLUSTER-CONFIG-FILE NODES-7000.CONF  
    6. cluster-node-timeout 15000  
    7. cluster-slave-validity-factor 10   
    8. cluster-migration-barrier 1  
    9. cluster-require-full-coverage  yes  



Copy 5 copies of the redis.7000.conf file in the D:\rediscluster\redis directory, named Redis.7001.conf to Redis.7005.conf, to form 6 configuration files. That is, you are ready to configure 6 Redis nodes, and each node's profile uses Redis. port. conf named.
Modify the parameters inside the configuration file, note that the Port,appendfilename,cluster-config-file in these 6 files do not have duplicate names.
5. Start the Redis service
With the command window, in the D:\rediscluster\redis directory, execute the command: Redis-server.exe Redis. Port. conf launches the Redis instance and executes the configuration of the 6 ports for a total of 6 windows. No error is OK, there is a problem is the port conflict.
If you do not want to start with a command window, you can install Redis as a Windows service, and the command window switches to the D:\rediscluster\redis directory where the Install Services command is:

[HTML]View PlainCopy
    1. Redis-server.exe--service-install redis.7000.conf--service-name redis7000

After you modify this command (configuration file name and service name), execute 6 times, then install the 6 profiles as a service, then start the service.


6. Create a cluster
Download Ruby file: https://raw.githubusercontent.com/MSOpenTech/redis/3.0/src/redis-trib.rb, if the Redis source code was downloaded from the page at the first step, it also has this file under SRC.
Place redis-trib.rb under a folder and execute commands in the command window:
REDIS-TRIB.RB Create--replicas 1 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005


will prompt for confirmation, enter Yes, then OK

http://blog.csdn.net/yys79/article/details/51566417

Configuration of redis3.0 cluster on Windows (GO)

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.