redis主實例是什么?
需要啟動多個Redis實例: 一臺Redis服務器,分成多個節點,每個節點分配一個端口(6380,6381…),默認端口是6379。 每個節點對應一個Redis配置文件,如: redis6380.conf、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 (其他配置文件類似修改) 啟動多個redis實例: #redis-server/usr/local/redis/redis6380.conf #redis-server/usr/local/redis/redis6381.conf