redis集群环境安装,亲试可用

一. 安装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

<后记:>

安装过程参照:

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集群环境安装,亲试可用)