环境

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. 常见dotNet加密保护工具分析介绍(转)

    本文主要介绍一些dotNet加密保护工具的原理以及就其脱壳进行简单探讨.remotesoft protector.maxtocode..Net Reactor.Cliprotector  .themi ...

  2. Arcgis license 服务无法启动的解决问题

    来自:http://blog.csdn.net/u013719339/article/details/51240312 1.检查服务开没开.打开资源管理器然后按照下面就出现了.也可以打开运行——ser ...

  3. 通过 WCF 实现点对点文件共享 z

    下载免费的项目源代码 下载项目的数据库 目录 简介 背景 为什么是WCF? WCF历史简述 WCF基础 点对点概念 代码分析(它是怎么工作的) 核心转化引擎层 下载管理层 服务层 代码的使用(如何运行 ...

  4. Java Collection 简介

    转自:http://skyuck.iteye.com/blog/526358 在 Java2中,有一套设计优良的接口和类组成了Java集合框架Collection,使程序员操作成批的数据或对象元素极为 ...

  5. N个富文本编辑器/基于Web的HTML编辑器

    转自:http://www.cnblogs.com/lingyuan/archive/2010/11/15/1877447.html 基于WEB的HTML 编辑器,WYSIWYG所见即所得的编辑器,或 ...

  6. eclipse下使用git上传(下载)代码至(从)github

    eclipse下使用git插件上传代码至github 1.eclipse下安装git 正常情况下,eclipse 是自带 git 插件的,那么即可跳至步骤1的最后一小步,配置 git . 如果十分悲剧 ...

  7. 2013年,移动App设计的13大精髓

    摘要:在 过去的一年里,移动成主流也让众多的移动应用如雨后春笋般层出不穷,在众多开发者从中获利的同时竞争也愈演愈烈,如何才能保证自己立于不败之地?用户是上 帝,一切还得从应用说起.本文总结了新一年里A ...

  8. Redis主从集群以及Sentinel的配置

    安装完redis后,修改几个redis从节点的配置文件redis.conf,主要是加入主节点位置 slaveof 另外需要修改的地方包括,这样允许其他的从节点连入 bind 0.0.0.0 prote ...

  9. Microsoft Visual C++ 6.0预处理器参考手册

    返回总目录 Microsoft Visual C++ 6.0 预处理器参考手册 目录引言........................................................ ...

  10. Django的restful api三方包:djangorestframework

    文档位置:https://www.django-rest-framework.org/ 代码位置:https://github.com/encode/django-rest-framework/tre ...