Record the steps to build a Redis cluster

Source: Internet
Author: User
Tags download redis ftp mkdir redis redis cluster install redis

Official Information https://redis.io/topics/cluster-tutorial,

First download redis,http://download.redis.io/releases/redis-4.0.6.tar.gz

Tar zxvf redis-4.0.6.tar.gz

CD redis-4.0.6

Make

Make error GCC diagnostic not allowed inside functions, check the data found to be the GCC version is too low, upgrade GCC, according to this article http://blog.csdn.net/u014028392/article /details/70139152, upgrade to GCC version 4.8.2, re-make, success.

Make a soft chain:

Ln-s Src/redis-server/usr/bin/redis-server

Ln-s SRC/REDIS-CLI/USR/BIN/REDIS-CLI


Create a redis.conf configuration file that writes the following:

Port 7000
cluster-enabled Yes
cluster-config-file nodes.conf
cluster-node-timeout
Yes
Create 6 instances

mkdir cluster-test
cd cluster-test
mkdir 7000 7001 7002 7003 7004 7005
Copy the configuration file to the directory for each instance:

CP redis.conf Cluster-test/7000/

CP redis.conf cluster-test/7001/... The redis.conf port in each instance directory is then modified to the port of the corresponding instance, for example, 7001 directory configuration file is changed to Port 7001 to start 6 instances: cd cluster-test/7000/&& redis-server. Redis.conf next create cluster, need Ruby version 2.3.1 above,

ftp://ftp.ruby-lang.org/pub/ruby/ruby-2.3.1.tar.gz Download the latest Ruby installation package ruby-2.3.1.tar.gz

Gem Update--system upgrade to the latest version 2.5.1

Gem install Redis installation Redis module

This will be an error cannot connect to the gem source, can not be connected to the official source of foreign countries, may be provided by Taobao

Gem sources remove http://rubygems.org/

Gem Sources-a https://ruby.taobao.org/

This step may error The SSL problem cannot open HTTPS connection, workaround refer to my this article

http://blog.csdn.net/beyondlpf/article/details/51275051
After the installation succeeds, execute the Create command:

./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
Create complete after entering Yes


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.