Windows下 redis 启动多实例(redis分片实现)

本人电脑32位Windows操作系统,redis已经安装完成,这里不多说

下面开始配置redis的多实例

一、默认redis服务实例端口为6379

二、我们新配置一个端口为6381的redis实例

假设 redis安装目录为 D:\redis

1、复制redis.conf 文件,重命名为redis6381.conf

2、修改redis6381.conf文件内容如下:

# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize yes

# When running daemonized, Redis writes a pid file in /var/run/redis.pid by
# default. You can specify a custom pid file location here.
pidfile /var/run/redis_6381.pid

# Accept connections on the specified port, default is 6379.
# If port 0 is specified Redis will not listen on a TCP socket.
port 6381

# If you want you can bind a single interface, if the bind option is not
# specified all the interfaces will listen for incoming connections.
#
# bind 127.0.0.1
3、修改完成之后,cmd下启动新的redis实例,如下图已经启动完成

Windows下 redis 启动多实例(redis分片实现)_第1张图片

你可能感兴趣的:(redis研究,redis,实例)