In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces you to use redis-cli to build redis5.x cluster, the content is very detailed, interested friends can refer to, hope to be helpful to you.
1. Create a download directory, download and install
Mkdir-p / usr/local/src/redis
Cd / usr/local/src/redis
Wget http://download.redis.io/releases/redis-stable.tar.gz # download redis
Tar xvzf redis-stable.tar.gz
Cd redis-stable
Make
Make install
2, create a configuration file directory
Mkdir-p / etc/redis/7001
Mkdir-p / etc/redis/7002
Mkdir-p / etc/redis/7003
Mkdir-p / etc/redis/7004
Mkdir-p / etc/redis/7005
Mkdir-p / etc/redis/7006
3. Create a data storage directory
Mkdir-p / var/redis/7001
Mkdir-p / var/redis/7002
Mkdir-p / var/redis/7003
Mkdir-p / var/redis/7004
Mkdir-p / var/redis/7005
Mkdir-p / var/redis/7006
4, write the configuration file
Vim / etc/redis/7001/7001.conf
Port 7001
Bind 10.211.55.26
Dir / var/redis/7001
Cluster-enabled yes
Cluster-config-file nodes-7001.conf
Cluster-node-timeout 5000
Appendonly yes
Daemonize yes
Protected-mode no
Pidfile / var/run/redis_7001.pid
5. Create a cluster
/ usr/local/bin/redis-cli-- cluster create 10.211.55.26 cluster-replicas 7002 10.211.55.26 cluster-replicas 7002 10.211.55.26
6. Use scripts to manage the cluster
Vim / usr/local/src/redis/redis-stable/utils/create-cluster/create-cluster
Ports=7000
Nodes=6
Cp / usr/local/src/redis/redis-stable/utils/create-cluster/create-cluster / usr/local/bin/utils/
Vim / usr/local/bin/utils/create-cluster
Change
Ports=7000
Nodes=6
Add-h 10.211.55.26 to the stop command
/ usr/local/bin/utils/create-cluster stop
/ usr/local/bin/utils/create-cluster start about using redis-cli to build redis5.x cluster is shared here. I hope the above content can be helpful to you and learn more knowledge. If you think the article is good, you can share it for more people to see.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.