环境

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. CISC RISC架构

    参考: http://capacity.blog.163.com/blog/static/20866413120129261737102/ http://cs.stanford.edu/people/ ...

  2. inno setup检查是否已经安装

    [Registry] Root: HKLM; Subkey: "Software\MCS"; ValueType: string; ValueName: "MCSVers ...

  3. linux清空文件方法

    1.以下方法,清除后,文件大小为0 2.以下方法,清除后,文件大小为1 多了一个结束字符

  4. iOS网络编程解析协议三:JSON数据传输解析

    作为一种轻量级的数据交换格式,正在逐步取代XML,成为网络数据的通用格式 基于JavaScript的一个子集 易读性略差,编码手写难度大,数据量小 JSON格式取代了XML给网络传输带来了很大的便利, ...

  5. Qt 维护工具MaintenanceTool.exe 使用

    QT如何管理组件(解决“要继续此操作,至少需要一个有效且已启用的储存库”问题) 转载2017-10-26 01:48:46 标签:qt QT的组件管理软件并没有在开始菜单或者桌面添加快捷方式(5.9版 ...

  6. Web开发者需养成的8个好习惯

    优秀的Web开发人员工作效率更高,因为他们拥有丰富的经验和良好的习惯.作者Gregor Dorfbauer分享了用于Web开发中的8个好习惯,这些良好的工作习惯不仅能提高效率,还能让您创建更加优秀的应 ...

  7. java笔试题(5)

    1.Comparable和Comparator接口是干什么的?列出它们的区别. Java提供了只包含一个compareTo()方法的Comparable接口.这个方法可以个给两个对象排序.具体来说,它 ...

  8. Vue组件开发实践之scopedSlot的传递

    收录待用,修改转载已取得腾讯云授权 导语 现今的前端开发都讲究模块化组件化,即把公共的交互和功能封装到一个个的组件之中,在开发整体界面的时候就能像搭积木一样快速清晰高效.在使用Vue开发我们的vhtm ...

  9. 免费资源:Bootstrap开发的创意模板

    在线演示 免费下载 一套免费的Bootstrap网站模板,使用现代的布局并支持响应式.拥有非常棒的CSS3动画效果及其滚动效果.

  10. Python网络爬虫 - 1. 准备工作

    1. 安装Beautiful Soup 下载地址 http://www.crummy.com/software/BeautifulSoup/bs4/download/4.4/ 解压后,进入根目录 控制 ...