Build multiple redis instances on one machine

Source: Internet
Author: User
Tags redis server

By default, the redis program is installed in the/usr/local/redis directory;

Configuration File:/usr/local/redis. conf. The default port configured in this configuration file is 6379;

Redis startup command path:/usr/local/bin/redis-server.

You can specify a port to start multiple redis processes.

#/Usr/local/bin/redis-server -- Port 6380 & # Start the redis instance with port 6380.


=============================== Each of the following processes corresponds to a configuration file (reprinted) ========================================================== ==============

You need to start multiple redis instances:
A redis server is divided into multiple nodes. Each node is allocated with a port ...), The default port is 6379.
Each node corresponds to a redis configuration file, such as redis6380.conf and redis6381.conf.

# Cp redis. confredis6380.conf

# Vi redis6380.conf

Pidfile: pidfile/var/run/redis/redis_6380.pid

Port 6380

Logfile: logfile/var/log/redis/redis_6380.log

Rdbfile: dbfilenamedump_6380.rdb

 

(Other configuration files are modified similarly)

Start Multiple redis instances:

# Redis-server/usr/local/redis/redis6380.conf

# Redis-server/usr/local/redis/redis6381.conf

 

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.