2011年2月23日水曜日

・CentOS 5系用にRuby1.8.7をインストール

CentOS 5系(RedHat Enterprise Linux 5系)でサポートされているRubyのバージョンは1.8.5系です。

Rubyもバージョン1.8系の最新版である1.8.7に、RPM(yum)を作成してバージョンアップします。

# ruby -v
ruby 1.8.5 (2006-08-25) [i386-linux]

RPMを作るためには、ソースコードと関連パッケージとの依存関係を記したspecファイル
として雛形となるべくFedoraのrpmリポジトリから、src.rpmファイルを取得します。

# cd /tmp
# wget http://download.fedora.redhat.com/pub/fedora/linux/development/15/source/SRPMS/ruby-1.8.7.330-3.fc15.src.rpm

次にダウンロードしたファイルを展開。(/usr/src/redhatに配置される)

# rpm -i --nomd5 ruby-1.8.7.330-3.fc15.src.rpm
# cd /usr/src/redhat/SPECS/

# yum install compat-readline5-devel tcl-devel tk-devel
# wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7.tar.bz2

0 件のコメント:

コメントを投稿