1. 准备需要的安装的东西
yum -y install make gcc openssl-devel zlib-devel gcc gcc-c++ make autoconf readline-devel curl-devel expat-devel gettext-devel ncurses-devel sqlite3-devel mysql-devel httpd-devel wget which

2 下载源文件
cd /usr/src
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar zxf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure –prefix=/usr/local
make && make install

cd /usr/src
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
tar zxf ruby-1.9.3-p0.tar.gz
cd ruby-1.9.3-p0
./configure –prefix=/usr/local –disable-install-doc –with-opt-dir=/usr/local/lib
make && make install

3 whereis 查看ruby路径
whereis ruby

Comments are closed.

Post Navigation