美文网首页
redis安装集群

redis安装集群

作者: _micang | 来源:发表于2020-07-08 10:26 被阅读0次

    一. 安装openssl

    $  tar -xzvf openssl-1.1.1s.tar.gz

    $  cd openssl-1.1.1s

    $  ./config -fPIC --prefix=/usr/local/openssl enable-shared

    $  ./config -t

    $  make && make install

    二. 安装zlib-devel

    $  sudo yum -y install zlib-devel

    三.  添加Ruby支持(ruby2.2.2+  version)

    1. 安装ruby相关依赖

    $  yum -y install ruby ruby-devel rubygems rpm-build

    $  ruby -v  [RESULT] ruby 2.0.0p648 (2015-12-16) [x86_64-linux]

    2.下载源码包(暂时不支持yum升级)

    $  wget https://cache.ruby-lang.org/pub/ruby/ruby-2.5.1.tar.gz

    或 

    $  curl -O -L https://cache.ruby-lang.org/pub/ruby/ruby-2.5.1.tar.gz

    3.解压并编译安装

    $  tar -zxvf ruby-2.5.1.tar.gz$  cd ruby-2.2.7

    $  ./configure --prefix=/usr/local/ruby-2.5.1 --with-openssl-dir=/usr/local/openssl/ssl$  make && make install

    4.创建快捷键&建立连接

    $  rm -f /usr/bin/ruby  #先删除旧的快捷方式重新创建

    $  ln -s /usr/local/ruby-2.5.1/bin/ruby /usr/bin/ruby

    $  ruby -v

      [RESULT] ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]

    $  ln -s /usr/local/ruby-2.5.1/include /include

    5.编译ruby资源包下的openssl

    $  cd  /home/docker/server/ruby-2.5.1/ext/openssl  #切换到tar解压后的源码包下

    $  ruby extconf.rb --with-openssl-include=/usr/local/openssl/include/ --with-openssl-lib=/usr/local/openssl/lib

    $  make

    $  make install

    /usr/bin/install -c -m 0755 openssl.so  ....../site_ruby/2.2.0/x86_64-linux

    installing default openssl libraries

    6.安装redis集群环境

    $  gem install redis

    7.安装redis集群环境

    $  cd /home/docker/server/redis-stable/src

    $  ./redis-trib.rb create --replicas 1 10.65.28.249:7000 10.65.28.249:7001 10.65.28.249:7002 10.65.28.249:7003 10.65.28.249:7004 10.65.28.249:7005

    <后记:部署过程中发现有的集群端口没有开通权限,坑爹啊……>

    备忘:

    开放集群中所有端口

    安装过程参照:

    https://blog.csdn.net/huang930528/article/details/51027915

    https://blog.csdn.net/zhengwei125/article/details/80019887

    redis集群密码问题参照

    https://blog.csdn.net/FengYe_YuLu/article/details/77628118

    https://blog.csdn.net/jtbrian/article/details/53691540

    相关文章

      网友评论

          本文标题:redis安装集群

          本文链接:https://www.haomeiwen.com/subject/ftpqcktx.html