Redis master server configuration (Getting started)

Source: Internet
Author: User
Tags redis server

1. Start multiple Redis servers at the same time, consider starting two or three Redis servers on the same machine, listening to different ports separately

2. Create a Client connection

3, set the master-slave relationship

4. Testing

Specific procedures:

First, create a boot Redis server

./redis-server/etc/redis/redis.conf Default Port 6379

./redis-server/etc/redis/redis.conf--port 10000 Specify port 10000 (two horizontal lines-)

./redis-server/etc/redis/redis.conf--port 10001 Specify Port 10001

Second, establish client connection respectively

./redis-cli-p 6379 (one horizontal line)

./redis-cli-p 10000

./redis-cli-p 10001

Third, set up the master-slave relationship

The following commands are executed on the 10000 10001 client, respectively:

Slaveof 192.168.183.128 6379 (no colon required)

Here, the setup is complete and can be tested.

1, any one from the client, the Get test

Get Name

(nil)

Indicates that there is no key named name on the server

2, in the main client settings

Set name test

3. Testing again from the client

Get Name

"Test"

Congratulations, ok! Test Pass.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Redis master server configuration (Getting started)

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.