[root@test20 ~]# wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
[root@test20 ~]# tar xzvf yaml-0.1.4.tar.gz
[root@test20 yaml-0.1.4]# cd yaml-0.1.4
[root@test20 yaml-0.1.4]# ./configure --prefix=/usr/local
[root@test20 yaml-0.1.4]# make
[root@test20 yaml-0.1.4]# make install
[root@test20 ~]# wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
[root@test20 ~]# tar xzvf ruby-1.9.3-p0.tar.gz
[root@test20 ~]# cd ruby-1.9.3-p0
[root@test20 ruby-1.9.3-p0]# ./configure --prefix=/usr/local --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib
[root@test20 ruby-1.9.3-p0]# make
[root@test20 ruby-1.9.3-p0]# make install
出处:http://collectiveidea.com/blog/archives/2011/10/31/install-ruby-193-with-libyaml-on-centos/