zoukankan      html  css  js  c++  java
  • 笔记

    ./redis-trib.rb create --replicas 1 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 127.0.0.1:7006


    nohup ./src/redis-server ./redis.conf &


    nohup ./src/redis-server ./redis.conf &

    cluster-enabled


    需要安装:
    yum install ruby
    gem install redis-3.0.0.gem
    yum install rubygems


    修改配置:

    port 30001 #分别更改
    daemonize yes #允许后台启动,不用再另开终端
    cluster-enabled yes
    cluster-config-file odes
    cluster-node-timeout 5000
    appendonly yes


    1、启动六台服务器;

    2、执行 ./redis-trib.rb create --replicas 1 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 127.0.0.1:7006

    #!/bin/bash

    ps -ef | grep redis | awk '{print $2}' | xargs kill

    nohup /usr/local/dongjiang/redis/redis-cluster/redis01/src/redis-server /usr/local/dongjiang/redis/redis-cluster/redis01/redis.conf &

    nohup /usr/local/dongjiang/redis/redis-cluster/redis02/src/redis-server /usr/local/dongjiang/redis/redis-cluster/redis02/redis.conf &

    nohup /usr/local/dongjiang/redis/redis-cluster/redis03/src/redis-server /usr/local/dongjiang/redis/redis-cluster/redis03/redis.conf &

    nohup /usr/local/dongjiang/redis/redis-cluster/redis04/src/redis-server /usr/local/dongjiang/redis/redis-cluster/redis04/redis.conf &

    nohup /usr/local/dongjiang/redis/redis-cluster/redis05/src/redis-server /usr/local/dongjiang/redis/redis-cluster/redis05/redis.conf &

    nohup /usr/local/dongjiang/redis/redis-cluster/redis06/src/redis-server /usr/local/dongjiang/redis/redis-cluster/redis06/redis.conf &

    ps -ef | grep redis


    ./redis-trib.rb create --replicas 1 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 127.0.0.1:7006

    Life is so short,do something to make yourself happy, such as coding.
  • 相关阅读:
    解决winform DataGridView 绑定数字值列排序不对的问题
    C#中向数据库中添加注册新用户,并查询数据库中是否存在同名的用户。
    SQL数据库的脱机与联机操作
    odoo视频教程收集
    odoo10导入导出-转
    草稿-bom- 肥料生产
    freebsd 域名服务器
    freebsd启动报错:My unqualified host name unkown...Sleeping for retry.
    docker-freebsd-20150625
    supervisorctl error
  • 原文地址:https://www.cnblogs.com/dongjiang/p/14282469.html
Copyright © 2011-2022 走看看