Building Redis clusters with VMware virtual machines (Twemproxy)

Source: Internet
Author: User
Tags bind redis redis version install redis redis server

Building Redis clusters with VMware virtual machines (Twemproxy)

1. Introduction to the Environment

Virtual machine: Vmware®workstation 11.0.0 build-2305329

Operating system: Ubuntu 14.04 Server AMD64

Redis version: Redis Server 2.8.4 bits=64

2. Environment configuration

A) The cluster consists of 1 proxy hosts and 5 Redis servers, and after installing the virtual machine in the usual way, you can get redis-server directly through Apt-get.

sudo apt-get install Redis-server

b) Modify the system configuration file

sudo echo vm.overcommit_memory=1 >>/etc/sysctl.conf
Sysctl Vm.overcommit_memory=1

Or

echo Vm.overcommit_memory=1 >>/proc/sys/vm/overcommit_memory


c) Configuring the network environment

In order to build a test LAN, in the virtual machine network I choose only host mode, restart the virtual machine, in order to facilitate the management of my LAN IP settings, The address of the slave-1 IPv4 address setting 192.168.131.101,slave-2 is set to 192.168.131.102, and by analogy.

sudo ifconfig eth0 192.168.131.10nsudo ifconfig eth0 downsudo ifconfig eth0 up

d) Configure the listening IP address of the Redis server

To configure the slave1~slave-5, use the editor to open/etc/redis/redis.conf, find bind 127.0.0.1, add your LAN address, here are modified to bind 192.168.131.10n 127.0.0.1

sudo vim/etc/redis/redis.confsudo service redis-server restart

Test on one of the slave servers to see if you can ping other hosts, and test through REDIS-CLI to see if data can be written and read

E


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.