nosql-redis-single-Machine multi-instance, pseudo-distributed environment construction

Source: Internet
Author: User
Tags install redis

1. Requires 6 Redis instances

2, create Redis-cluster, copy 6 copies, install generated bin

3. Modify the configuration file

Open cluster-enabled Yes to comment before

Port is 7001,7002,7003,7004,7005,7006, respectively.

Bind changed to current IP

Protected-mode is a new feature after Redis 3.2, yes (Redis only receives requests from the IP address list when this configuration is enabled), no (processing all requests)

4, copy redis installation files, src in the Ruby cluster creation script REDIS-TRIB.RB

5. Ruby scripts run in a running environment that requires ruby

Yum Install Ruby

Yum Install RubyGems

Install the Runby script to run the three-party library you need to use

Gem Install Redis-3.0.0.gem

6. Execute the Ruby script to create the cluster

./redis-trib.rb Create--replicas 1 ip:7001 ip:7002 ip:7003 ip:7004 ip:7005 ip:7006

7, any client in the cluster can connect

Redis-cli-h ip-p port-c

-C indicates a cluster connection, otherwise the data cannot be stored properly, and the data can be transferred to each library normally after connecting.

nosql-redis-single-Machine multi-instance, pseudo-distributed environment construction

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.