One-click scripts for setting up various Redis environments locally. Supports standalone, master-slave, Sentinel, and 3-master-3-slave cluster modes. Perfect for development, testing, and learning.
.
├── 3master3slave/ # Scripts & configs for 3-master 3-slave Redis Cluster
├── master-slave/ # Scripts & configs for master-slave Redis
├── sentinel/ # Scripts & configs for Redis Sentinel HA cluster
├── standalone/ # Scripts & configs for standalone Redis
- One-click start/stop/status for a single Redis instance
- Best for basic development and testing
- One master, two slaves; supports one-click start, stop, status, log management, and data cleanup
- Default ports: master 6379, slaves 6380/6381 (configurable)
- See
master-slave/README.mdfor details
- One master, two slaves, three sentinels; one-click start/stop
- Default ports: Redis 6379/6380/6381, Sentinel 26379/26380/26381
- For high availability testing
- 3-master 3-slave Redis Cluster; supports one-click create, start, stop, status, and cleanup
- Default ports: masters 7001/7002/7003, slaves 7004/7005/7006
- See
3master3slave/README.mdfor details
Example: 3-master 3-slave cluster
# 1. Enter the directory
cd 3master3slave
# 2. Create the cluster
./redis_cluster_manager.sh create
# 3. Check status
./redis_cluster_manager.sh status
# 4. Stop the cluster
./redis_cluster_manager.sh stop
# 5. Clean up data
./redis_cluster_manager.sh cleanupFor other modes, enter the corresponding directory and refer to its
README.mdor script help.
- OS: Linux or macOS
- Redis 6.0+
- Bash 4.0+
- Recommended:
lsof,netstat, and other common tools
- Port already in use: Free the port or change the config file
- Redis not installed: Please install Redis first
- Permission denied: Make scripts executable with
chmod +x *.sh
- For development/testing only. Do NOT use in production
- Cleanup will delete all data—use with caution
- To customize ports, directories, etc., edit the relevant
.conffiles
Pull requests and issues are welcome!
MIT License
For detailed instructions, parameter configuration, and architecture principles, see the README.md or comments in each subdirectory.