准备做redis-cluster,需要ruby2.2环境
开整
环境:Centos7.2最小安装
yum源:阿里的base和epel源
*********************************************************************
Install Dependencies
**********************************************************************
yum -y groupinstall "Development Tools"
yum -y install gdbm-devel libdb4-devel libffi-devel libyaml libyaml-devel ncurses-devel openssl-devel readline-devel tcl-devel
**********************************************************************
Download and Build Ruby from Source
**********************************************************************
mkdir -p rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} wget http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.gz -P rpmbuild/SOURCES wget https://raw.githubusercontent.com/tjinjin/automate-ruby-rpm/master/ruby22x.spec -P rpmbuild/SPECS rpmbuild -bb rpmbuild/SPECS/ruby22x.spec yum -y localinstall rpmbuild/RPMS/x86_64/ruby-2.2.-.el7.centos.x86_64.rpm
********************************************************************
Test the Install
********************************************************************
ruby -v
gem -v
网上好多都是编译安装,坑太多,需要改ssl相关的代码
这个方法比较适合我这样的小白