1、创建/myredis文件夹

2、复制redis.conf配置文件到文件夹中

3、配置一主两从,创建三个配置文件
- redis6379.conf
- redis6380.conf
- redis6381.conf
4、在三个配置文件中写入以下内容
include /myredis/redis.conf
pidfile /var/run/redis_6379.pid
port 6379
dbfilename dump6379.rdb
masterauth 密码
5、启动三个redis服务

- 查看当前主机运行状况info replication




