安装运行redis-trib.rb所需的环境
2017-10-12 15:36
435 查看
运行redis-trib.rb脚本配置Redis的cluster,需要安装ruby环境,这里采用源码安装:
1:下载源码包:
https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.gz
2:解压安装:
[plain] view
plain copy
tar xzvf ruby-2.2.3.tar.gz -C /root/redis
cd /root/redis/ruby-2.2.3/
./configure
make
make install
3:安装Ruby之后,因redis-trib.rb依赖于gem包redis,因此需要执行命令:gem install redis,报错:
[plain] view
plain copy
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
解决方法:
[plain] view
plain copy
apt-get install zlib1g-dev
cd /root/redis/ruby-2.2.3/ext/zlib
ruby ./extconf.rb
make
make install
4:再次执行命令gem install redis,再次报错:
[plain] view
plain copy
ERROR: While executing gem ... (Gem::Exception)
Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
解决方法:
[plain] view
plain copy
apt-get install libssl-dev
cd /root/redis/ruby-2.2.3/ext/openssl
ruby ./extconf.rb
ln -s /root/redis/ruby-2.2.3/include /
make
make install
5:再次执行命令gem install redis,竟然还是报错,错误信息是:
[plain] view
plain copy
Errno::ECONNRESET: Connection reset by peer
查了一下原因,竟然是伟大的墙做的贡献(https://ruby.taobao.org/),解决办法如下:
[plain] view
plain copy
#gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
https://ruby.taobao.org/ added to sources https://rubygems.org/ removed from sources
#gem sources -l
*** CURRENT SOURCES ***
https://ruby.taobao.org/
6:再次执行命令gem install redis,终于成功,此时,就可以运行redis-trib.rb脚本了。
转自:http://blog.csdn.net/gqtcgq/article/details/50277419
1:下载源码包:
https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.gz
2:解压安装:
[plain] view
plain copy
tar xzvf ruby-2.2.3.tar.gz -C /root/redis
cd /root/redis/ruby-2.2.3/
./configure
make
make install
3:安装Ruby之后,因redis-trib.rb依赖于gem包redis,因此需要执行命令:gem install redis,报错:
[plain] view
plain copy
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
解决方法:
[plain] view
plain copy
apt-get install zlib1g-dev
cd /root/redis/ruby-2.2.3/ext/zlib
ruby ./extconf.rb
make
make install
4:再次执行命令gem install redis,再次报错:
[plain] view
plain copy
ERROR: While executing gem ... (Gem::Exception)
Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources
解决方法:
[plain] view
plain copy
apt-get install libssl-dev
cd /root/redis/ruby-2.2.3/ext/openssl
ruby ./extconf.rb
ln -s /root/redis/ruby-2.2.3/include /
make
make install
5:再次执行命令gem install redis,竟然还是报错,错误信息是:
[plain] view
plain copy
Errno::ECONNRESET: Connection reset by peer
查了一下原因,竟然是伟大的墙做的贡献(https://ruby.taobao.org/),解决办法如下:
[plain] view
plain copy
#gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
https://ruby.taobao.org/ added to sources https://rubygems.org/ removed from sources
#gem sources -l
*** CURRENT SOURCES ***
https://ruby.taobao.org/
6:再次执行命令gem install redis,终于成功,此时,就可以运行redis-trib.rb脚本了。
转自:http://blog.csdn.net/gqtcgq/article/details/50277419
相关文章推荐
- 09安装运行redis-trib.rb所需的环境
- Redis之集群redis-trib.rb环境的搭建-yellowcong
- Servlet运行环境所需的软件安装及WAP编程环境设置
- Linux服务器运行环境搭建(二)——Redis数据库安装
- redis cluster管理工具redis-trib.rb详解
- Linux环境下Redis安装配置步骤
- linux安装redis及phpredis环境配置(超详细)
- WinCE 6.0环境安装以及在模拟器上运行第一个WinCE 6.0系统
- Linux搭建Java服务器环境-Redis安装
- ZT:linux下安装JSP运行环境的搭建。
- 【Java SE】如何安装JDK以及配置Java运行环境
- win7下安装配置tomcat,java运行环境
- VMware vSphere开发(1)安装配置VMware vSphere Web Services SDK的运行环境
- 如何在Mac OS X上安装 Ruby运行环境
- Windows环境下安装Redis 和 Linux 环境下安装Redis
- Android安装NDK运行环境无需cygwin自动编译生成SO
- 安卓开发环境搭建教程及所需的安装文件
- win7下安装配置tomcat,java运行环境
- 开源路由软件Quagga 源代码 编译/安装/运行/调试(Eclipse环境)
- Vue.js 运行环境搭建详解(基于windows的手把手安装教学)及vue、node基础知识普及