edcf 发表于 2015-7-20 10:01:03

redis单主机多实例

  假设我们服务器上面已经安装好了redis;
  可参看:http://www.iyunv.com/super-d2/p/3819385.html
  下面我们来配置redis单主机多实例:
  我们首先拷贝两份文件:
  # cp /etc/redis.conf /etc/redis6380.conf
  # cp /etc/redis.conf /etc/redis6381.conf
  一、配置6380端口
  # vim /etc/redis6380.conf

  # src/redis-server /etc/redis6380.conf
  可以看到6380端口已经启动起来

  登录6380端口:

  二、同理我们配置6381端口:

  # src/redis-server /etc/redis6381.conf
  可以看到6381端口也已经启动起来
  登录6381端口

  查看进程:

  二、配置主从:
  修改从库配置:
  # vim /etc/redis6380.conf
  # vim /etc/redis6381.conf

  主库

  从库:

  可以看到主从数据实现同步;
  目前存在的一个问题,我没法将两个从库配置为开机启动;
页: [1]
查看完整版本: redis单主机多实例