zoukankan      html  css  js  c++  java
  • redis集群安装

    环境:centos7

    单节点安装
    下载软件
    wget http://download.redis.io/releases/redis-3.2.6.tar.gz
    编译安装
    tar zxvf redis-3.2.6.tar.gz -C /usr/local/soft/
    cd /usr/local/soft/
    cd redis-3.2.6/
    make && make install
    cd /usr/local/soft/
    mkdir redis_cluster
    cd redis_cluster/
    修改配置文件,并启动

    安装ruby、rubygem
    wget http://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.5.tar.gz
    tar zxvf ruby-2.3.5.tar.gz
    cd ruby-2.3.5
    ./configure --prefix=/opt/ruby
    make && make install
    ln -s /opt/ruby/bin/ruby /usr/bin/ruby
    ln -s /opt/ruby/bin/gem /usr/bin/gem
    安装redis接口
    wget http://rubygems.org/downloads/redis-3.3.0.gem
    gem install -l redis-3.3.0.gem
    查看ruby是否安装成功
    ./redis-trib.rb
    Usage: redis-trib <command> <options> <arguments ...>

    rebalance host:port
    --threshold <arg>
    --simulate
    --weight <arg>
    --timeout <arg>
    --auto-weights
    --pipeline <arg>
    --use-empty-masters
    info host:port
    check host:port
    fix host:port
    。。。
    创建集群(注意:先不设置密码,不然会报错can't connect to node)
    ./redis-trib.rb create --replicas 1 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002

    做一个决定,并不难,难的是付诸行动,并且坚持到底。
  • 相关阅读:
    CentOS/RHEL 查看用户登陆信息
    PAM
    块存储
    ECS
    SQL 基础应用
    MySQL 基础管理
    MySQL 体系结构
    JSON对象
    设置dom节点属性的代码优化
    Ext框架下的元素拖动
  • 原文地址:https://www.cnblogs.com/wukc/p/14505341.html
Copyright © 2011-2022 走看看