redis部署集群依赖ruby

1、安装的工具包依赖的环境

 

yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison sqlite-devel iconv-devel 


2.安装rvm(ruby管理工具)

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


如果遇到以下错误:

Warning, RVM 1.26.0 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.26.11.tgz' - 'https://github.com/rvm/rvm/releases/download/1.26.11/1.26.11.tar.gz.asc'!

try downloading the signatures:


gpg2 --keyserver hkp://keys.gnupg.net --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

那么复制 

gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3


在控制台运行一次,然后再次运行

 

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

 安装成功后 会提示

 

# Administrator,

#

# Thank you for using RVM!

# We sincerely hope that RVM helps to make your life easier and more enjoyable!!!

#

# ~Wayne, Michal & team.

3.运行以下命令

echo "source /etc/profile.d/rvm.sh" >> ~/.bashrc && source /etc/profile.d/rvm.sh


那么接下来可以使用rvm来安装ruby了

 

 4.1、使用

rvm list known


 列出rvm知道的ruby版本,那么在这里就可以看到有什么版本可以安装了。原则自己需要的版本2.3.4

 

rvm install ruby-2.3.4

 

rvm可以帮助我们将ruby所依赖的包也一起安装进来。

使用以下命令安装ruby的redis的接口

gem install redis

redis和ruby环境配置完成,可以执行redis配置集群命令

 redis-trib.rb create --replicas 1 ip:端口 ip:端口 ip:端口--------
(多个实例以空格隔开)
 

 redis-trib.rb check 10.26.167.153:7000 查看主从

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值