Centos5.5にruby1.9.2,rails3.0.1環境構築

#rpmforge導入:

yum -y install yum-priorities
vi /etc/yum.repos.d/CentOS-Base.repo
各セクションに
priority=1
追加

wget http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
rpm --import RPM-GPG-KEY.dag.txt
rm -f RPM-GPG-KEY.dag.txt
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
vi /etc/yum.repos.d/rpmforge.repo

#rpmforge.repo
enabled = 1

enabled = 0

#checkinstall導入
wget http://www.asic-linux.com.mx/~izto/checkinstall/files/source/checkinstall-1.6.2.tar.gz

tar xvfz checkinstall-1.6.2.tar.gz

cd checkinstall-1.6.2
make
make install
/usr/local/sbin/checkinstall
「Please choose the packageing〜」と表示されたら「R」を入力し「Enter」キーを押す
rpm -Uvh --nomd5 /usr/src/redhat/RPMS/x86_64/checkinstall-1.6.1-1.x86_64.rpm --excludepath /selinux

#ruby install
yum install zlib-devel
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.gz
tar xvfz ruby-1.9.2-p0.tar.gz
cd ruby-1.9.2-p0

./configure --prefix=/usr
make
checkinstall --fstrans=no
#RPMのインストールと、確認
rpm -ih /usr/src/redhat/RPMS/x86_64/ruby-1.9.2-p0-1.x86_64.rpm
ruby -v

ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
#zlib
cd /usr/local/src/ruby-1.9.2-p0/ext/zlib/
ruby extconf.rb --with-zlib-include=/usr/include --with-zlib-lib=/usr/lib
make
make install

#sqlite3
wget http://www.sqlite.org/sqlite-amalgamation-3.7.3.tar.gz
tar xvfz sqlite-amalgamation-3.7.3.tar.gz
cd sqlite-3.7.3
./configure
checkinstall
rpm -ih /usr/src/redhat/RPMS/x86_64/sqlite-3.7.3-1.x86_64.rpm

gem i sqlite3-ruby

gem i rails