Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Redis Cluster installation tutorial

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the relevant knowledge of "Redis Cluster Installation Tutorial". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

1 Download version and compile

$ wget http://download.redis.io/releases/redis-5.0.4.tar.gz$ tar xzf redis-5.0.4.tar.gz$ cd redis-5.0.4$ make

2 Modify the redis.conf configuration file

port 7001 //port 7001,7002,7003 bind native ip //default ip is 127.0.0.1 needs to be changed to ip accessible by other node machines, otherwise the corresponding port cannot be accessed when creating the cluster, and the cluster cannot be created daemonize yes //redis background run pidfile /var/run/redis_7000.pid //pidfile corresponds to 7000,7001, 7002 cluster-enabled yes //enable cluster Remove comment #cluster-config-file nodes_7000.conf //Cluster configuration file starts autogeneration for the first time 7000,7001,7002 Remove comment #cluster-node-timeout 15000 //Request timeout defaults to 15 seconds, You can set your own settings to remove comments #appendonly yes //aof Log enabled if necessary, it will record a log for each write operation

3 mkdir redis_cluster

Create 7001, 7002, 7003, 7004, 7005, 7006 directories respectively

Copy the redis.conf file to the above directories

4 Write scripts to start each node

5 View node startup status:

ps -ef |grep redis //View redis startup netstat -nltp View port occupancy, port + 10000 is an integrated bus port, also requires open port netstat -tnlp| grep redis//view redis port open

6 Create a cluster and join each node redis-trib.rb This tool is now obsolete, use redis-cli:

7 Test clusters

"Redis Cluster Installation Tutorial" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report