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

来源:互联网 发布:数据库开发工程师任务 编辑:程序博客网 时间:2024/05/22 00:23

本人电脑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.<span style="color:#3333ff;">daemonize yes</span># When running daemonized, Redis writes a pid file in /var/run/redis.pid by# default. You can specify a custom pid file location here.<span style="color:#3333ff;">pidfile /var/run/redis_6381.pid</span># Accept connections on the specified port, default is 6379.# If port 0 is specified Redis will not listen on a TCP socket.<span style="color:#3333ff;">port 6381</span># 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实例,如下图已经启动完成


0 0