Ruby1.9.3 を CentOS6.3 にソースコードからインストールする手順をメモ。
■ yum
# yum check-update
# yum update
# yum -y install openssl-devel zlib-devel readline-devel |
# yum check-update
# yum update
# yum -y install openssl-devel zlib-devel readline-devel
■ yaml のインストール
# cd /usr/src/
# wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
# tar zxvf yaml-0.1.4.tar.gz
# cd yaml-0.1.4
# ./configure |& tee configure.log
# make |& tee make.log
# make install |
# cd /usr/src/
# wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
# tar zxvf yaml-0.1.4.tar.gz
# cd yaml-0.1.4
# ./configure |& tee configure.log
# make |& tee make.log
# make install
■ Ruby のインストール
・ダウンロード – Ruby
# wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p286.tar.gz
# tar zxvf ruby-1.9.3-p286.tar.gz
# cd ruby-1.9.3-p286
# ./configure \
--prefix=/usr/local \
--enable-shared \
--disable-install-doc \
--with-opt-dir=/usr/local/lib \
|& tee configure.log
# make |& tee make.log
# make install
# ruby -v |
# wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p286.tar.gz
# tar zxvf ruby-1.9.3-p286.tar.gz
# cd ruby-1.9.3-p286
# ./configure \
--prefix=/usr/local \
--enable-shared \
--disable-install-doc \
--with-opt-dir=/usr/local/lib \
|& tee configure.log
# make |& tee make.log
# make install
# ruby -v
■ Gem のアップデート
# gem -v
1.8.23
# gem update --system
# gem -v
1.8.24 |
# gem -v
1.8.23
# gem update --system
# gem -v
1.8.24
以上です。
【参考】
・完全にメモ。CentOS 6.2 に ruby をインストール : てるてる坊主
大場 寧子,大場 光一郎,五十嵐 邦明,櫻井 達生 技術評論社 2012-07-31