2012-10-31更新:修改源地址,以前的源地址已经不能使用。


原文:Installing Ruby 1.8.6 on CentOS with Yum

64位系统:

1
2
3
4
5
$ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
$ sudo rpm -Uvh http://download.elff.bravenet.com/5/x86_64/elff-release-5-3.noarch.rpm
$ sudo yum install ruby ruby-shadow ruby-ri ruby-rdoc gcc gcc-c++ ruby-devel -y
$ ruby -v
ruby 1.8.6 (2010-02-05 patchlevel 399) [x86_64-linux]

32位系统:

1
2
3
4
$ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
$ sudo rpm -Uvh http://download.elff.bravenet.com/5/i386/elff-release-5-3.noarch.rpm
$ sudo yum install ruby ruby-shadow ruby-ri ruby-rdoc gcc gcc-c++ ruby-devel -y
$ ruby -v

安装RubyGems:

1
2
3
4
5
6
$ wget http://rubyforge.org/frs/?group_id=126&release_id=43601
$ tar xzvf rubygems-1.3.7.tgz
$ cd cd rubygems-1.3.7
$ sudo ruby setup.rb
$ gem --version
1.3.7

留言

2012-08-26
次访问