CentOS 5.5 にRedmineを入れる兼ね合いで Rubyを手で導入した時の作業メモ

手順としては以下の3ステップ。
1) ソースからインストールする
2) 作成されたパッケージのインストール
3) 導入されたRubyのバージョンを確認する

1) ソースからrpmパッケージを作成する

# ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p302.tar.bz2
# bzip2 -dc | tar xvf ruby-1.8.7-p302.tar.bz2
# cd ruby-1.8.7-p302
# ./configure --prefix=/usr
# make
# checkinstall --fstrans=no
checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran
This software is released under the GNU GPL.
The checkinstallrc file was not found at:
/usr/local/sbin/../checkinstallrc
Assuming default values.
The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs?  [y]:
Please choose the packaging method you want to use.
Slackware [S], RPM [R] or Debian [D]? R
Please write a description for the package.
End your description with an empty line or EOF.
>>
**************************************
**** RPM package creation selected ***
**************************************
This package will be built according to these values:
1 -  Summary: [ Package created with checkinstall 1.6.2 ]
2 -  Name:    [ ruby-1.8.7 ]
3 -  Version: [ p302 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ Applications/System ]
7 -  Architecture: [ x86_64 ]
8 -  Source location: [ ruby-1.8.7-p302 ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ ruby-1.8.7 ]
Enter a number to change any of them or press ENTER to continue:
**********************************************************************
Done. The new package has been saved to
/usr/src/redhat/RPMS/x86_64/ruby-1.8.7-p302-1.x86_64.rpm
You can install it in your system anytime using:
rpm -i ruby-1.8.7-p302-1.x86_64.rpm
**********************************************************************

2) 作成されたパッケージのインストール

# rpm -ivh /usr/src/redhat/RPMS/x86_64/ruby-1.8.7-p302-1.x86_64.rpm

3) 導入されたRubyのバージョン確認

# ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
#