环境

centos7+redis3.2.12

redis requires Ruby version >= 2.2.2.

redis官方提供了redis-trib.rb工具,但是在使用之前 需要安装ruby,以及redis和ruby连接:

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

gem install redis

其中 gem install redis命令执行时出现了:

redis requires Ruby version >= 2.2.2的报错,查了资料发现是Centos默认支持ruby到2.0.0,可gem 安装redis需要最低是2.2.2

解决办法是 先安装rvm,再把ruby版本提升至2.3.3

1.安装curl

sudo yum install curl

2. 安装RVM

curl -L get.rvm.io | bash -s stable

注意这步,可能会继续报错

[root@localhost : ~]# curl -L get.rvm.io | bash -s stable

 % Total  % Received % Xferd Average Speed  Time  Time   Time Current

                 Dload Upload  Total  Spent  Left Speed

             :: :: --:--:-- 

Downloading https://github.com/rvm/rvm/archive/1.29.3.tar.gz

Downloading https://github.com/rvm/rvm/releases/download/1.29.3/1.29.3.tar.gz.asc

gpg: 于 2017年09月11日 星期一 05时59分21秒 JST 创建的签名,使用 RSA,钥匙号 BF04FF17

gpg: 无法检查签名:No public key

Warning, RVM 1.26. introduces signed releases and automated check of signatures when GPG software found. Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).

GPG signature verification failed for '/usr/local/rvm/archives/rvm-1.29.3.tgz' - 'https://github.com/rvm/rvm/releases/download/1.29.3/1.29.3.tar.gz.asc'! Try to install GPG v2 and then fetch the public key:
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
or if it fails:
command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
the key can be compared with:
https://rvm.io/mpapis.asc
https://keybase.io/mpapis
NOTE: GPG version 2.1. have a bug which cause failures during fetching keys from remote server. Please downgrade or upgrade to newer version (if available) or use the second method described above.
[root@localhost : ~]#

发现失败了,我们按照提示进行操作。

[root@localhost : ~]# curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -

gpg: 钥匙环‘/root/.gnupg/secring.gpg'已建立

gpg: /root/.gnupg/trustdb.gpg:建立了信任度数据库

gpg: 密钥 D39DC0E3:公钥“Michal Papis (RVM signing) <mpapis@gmail.com>”已导入

gpg: 合计被处理的数量:

gpg:      已导入: (RSA: )

gpg: 没有找到任何绝对信任的密钥

[root@localhost : ~]# curl -L get.rvm.io | bash -s stable

这时可能会发现其中一个can't download

出现这个提示

curl: () Peer reports incompatible or unsupported protocol version

查找原因是curl,nss版本低的原因,解决办法就是更新nss,curl。

yum update nss curl

成功后再执行

[root@localhost 19:45 ~]# curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -

gpg: 钥匙环‘/root/.gnupg/secring.gpg'已建立

gpg: /root/.gnupg/trustdb.gpg:建立了信任度数据库

gpg: 密钥 D39DC0E3:公钥“Michal Papis (RVM signing) <mpapis@gmail.com>”已导入

gpg: 合计被处理的数量:1

gpg:      已导入:1 (RSA: 1)

gpg: 没有找到任何绝对信任的密钥

[root@localhost 19:45 ~]# curl -L get.rvm.io | bash -s stable

 % Total  % Received % Xferd Average Speed  Time  Time   Time Current

                 Dload Upload  Total  Spent  Left Speed

100 24090 100 24090  0   0  3763   0 0:00:06 0:00:06 --:--:-- 3763

Downloading https://github.com/rvm/rvm/archive/1.29.3.tar.gz

Downloading https://github.com/rvm/rvm/releases/download/1.29.3/1.29.3.tar.gz.asc

gpg: 于 2017年09月11日 星期一 05时59分21秒 JST 创建的签名,使用 RSA,钥匙号 BF04FF17

gpg: 完好的签名,来自于“Michal Papis (RVM signing) <mpapis@gmail.com>”

gpg:        亦即“Michal Papis <michal.papis@toptal.com>”

gpg:        亦即“[jpeg image of size 5015]”

gpg: 警告:这把密钥未经受信任的签名认证!

gpg:    没有证据表明这个签名属于它所声称的持有者。

主钥指纹: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3

子钥指纹: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17

GPG verified '/usr/local/rvm/archives/rvm-1.29.3.tgz'

Creating group 'rvm'

Installing RVM to /usr/local/rvm/

Installation of RVM in /usr/local/rvm/ is almost complete:

 * First you need to add all users that will be using rvm to 'rvm' group,

  and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.

 * To start using RVM you need to run `source /etc/profile.d/rvm.sh`

  in all your open shell windows, in rare cases you need to reopen all shell windows.

[root@localhost 19:46 ~]

发现rvm已经安装成功了,为了让配置立即生效,我们需要用source命令导入rvm的配置文件。

3.

source /usr/local/rvm/scripts/rvm

4. 查看rvm库中已知的ruby版本

rvm list known

5. 安装一个ruby版本

rvm install 2.3.3

6. 使用一个ruby版本

rvm use 2.3.3

7. 设置默认版本

rvm remove 2.0.0

8. 卸载一个已知版本

ruby --version

9. 再安装redis就可以了

gem install redis

Redis集群搭建问题汇总的更多相关文章

  1. 25.redis集群搭建笔记

    ###Redis集群### 0.准备 软件: redis-3.0.0.gem redis-3.0.0.tar.gz#源码   1.安装ruby环境 redis基于ruby槽位计算,hash算法技术,k ...

  2. Redis 集群搭建详细指南

    先有鸡还是先有蛋? 最近有朋友问了一个问题,说毕业后去大城市还是小城市?去大公司还是小公司?我的回答都是大城市!大公司! 为什么这么说呢,你想一下,无论女孩男孩找朋友都喜欢找个子高胸大的.同样的道理嘛 ...

  3. 二、redis集群搭建

    redis集群搭建 redis3.0后支持集群.集群中应该至少有三个节点,每个节点有一备份节点.需要6台服务器.搭建伪分布式,需要6个redis实例.搭建集群的步骤: 一.安装单机版redis 第一步 ...

  4. redis集群搭建及注意事项

    上一篇:redis的安装及注意事项 这里,在一个Linux虚拟机上搭建6个节点的redis伪集群,思路很简单,一台虚拟机上开启6个redis实例,每个redis实例有自己的端口.这样的话,相当于模拟出 ...

  5. Linux Redis集群搭建与集群客户端实现(Python)

    硬件环境 本文适用的硬件环境如下 Linux版本:CentOS release 6.7 (Final) Redis版本: Redis已经成功安装,安装路径为/home/idata/yangfan/lo ...

  6. [转载] Redis集群搭建最佳实践

    转载自http://blog.csdn.net/sweetvvck/article/details/38315149?utm_source=tuicool 要搭建Redis集群,首先得考虑下面的几个问 ...

  7. Linux Redis集群搭建与集群客户端实现

    硬件环境 本文适用的硬件环境如下 Linux版本:CentOS release 6.7 (Final) Redis版本: Redis已经成功安装,安装路径为/home/idata/yangfan/lo ...

  8. Redis集群搭建-韩国庆

    认真一步一步搭建下来,就可以成功.... Redis-cluster集群架构讲解 redis集群专业名词称之为Redis-cluster,redis集群是从3.0版本以后才有的概念,也就是说在3.0之 ...

  9. redis集群搭建及设置账户(转)

    Redis集群搭建以及为集群设置密码 介绍安装环境与版本 用两台虚拟机模拟6个节点,一台机器3个节点,创建出3 master.3 salve 环境. redis 采用 redis-3.2.4 版本. ...

随机推荐

  1. Semaphore控制同时访问的线程个数countdownlatch等待多个线程执行完本身线程再执行

    Semaphore控制同时访问的线程个数countdownlatch等待多个线程执行完本身线程再执行 Semaphore控制同时访问的线程个数countdownlatch等待多个线程执行完本身线程再执 ...

  2. java socket 长连接 短连接

    长连接 是一旦一个客户端登陆上服务器,其与服务器之间的连接就不关闭,不管他们之间进行了多少次交易,直到客户端退出登陆或网络出现故障.这种技术在联机交易系统实现有利于提高效率. 短连接是客户端每发一个请 ...

  3. 【前台】【单页跳转】整个项目实现单页面跳转,抛弃iframe

    即如下: [想做到点击nav侧边栏,仅替换右边div中的内容,而不是跳转到新的页面,这样的话,其实整个项目中就只有一个完整的页面,其他的页面均只写<body>内的部分即可,或者仅仅写要替换 ...

  4. U盘安装Centos7.0图解

    用U盘安装Centos7.0 工具/原料 centos 7.0 64位系统:CentOS-7.0-1406-x86_64-DVD.iso ultraiso 一个至少8G的U盘 方法/步骤 1 1.先使 ...

  5. JQuery 动态提交form

    function exportExcel() { var merchantName = $('#merchantName').val(); var merchantNo = $('#merchantN ...

  6. 对于Ian的访谈,不少关于GAN的内容

    文章链接如下: http://3g.163.com/dy/article/DD1GBSLF0511ABV6.html 里面提到胶囊网络,我找了这篇文章看了下: https://blog.csdn.ne ...

  7. C#中的数组【转】

    目录 数组的声明 数组的初始化 数组的访问 数组的常用属性和方法 为方便起见,以下数组均定义为整型 数组的声明 C#声明数组时,方括号[]必须跟在类型后面,而不是标识符后面 1. 声明一维数组 C#数 ...

  8. EChart处理三维数据做图表、多维legend图例处理

    处理三维数据做图表,比如返回的数据就是一个个list,list里面某几个数据同属于一个维度,项目中的实例效果如下: 上面的khfx会有多个,比如db1.db2.db3等,下面的那些数据也会变化,目前需 ...

  9. 【精】iOS6 及其以上版本号自己主动旋转、手动强制旋转方案及布局适配

    1.布局适配方式 本文不讨论哪种布局适配方式最好.此处使用的是 Masonry 纯代码布局适配. (Masonry 底层就是 AutoLayout 的 NSLayoutConstraint) 2.iO ...

  10. [Algorithm] Dynamic programming: Find Sets Of Numbers That Add Up To 16

    For a given array, we try to find set of pair which sums up as the given target number. For example, ...