cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Cloud



Etc


Reference














.

programming:ruby:install_linux_source.html



Ruby

Installing Ruby from Source

Installing Ruby

Arrangement

# yum remove ruby
# yum -y install gcc zlib-devel openssl-devel sqlite sqlite-devel

Installing

How to not use prefix option

# export http_proxy=http://192.168.0.10:9999/
# wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p353.tar.gz 

# tar zxvf ruby-2.0.0-p353.tar.gz
# cd ruby-2.0.0-p353

# ./configure
# make
# make install

# ruby -v
# ln -s /usr/local/bin/ruby /usr/bin/ruby   <- If you needed

How to use prefix option

# tar xzf ruby-2.0.0-p647.tar.gz
# cd ruby-2.0.0-p647
# ./configure --prefix=/usr/local/ruby2.0.0-p647
# make
# make install

# ls -lh /usr/local/bin | grep ruby
# ln -s /usr/local/ruby2.0.0-p647/bin/* /usr/local/bin/
# ls -lh /usr/local/bin | grep ruby


Tips

Installed List
# cat ruby-2.0.0-p353/.installed.list 



programming/ruby/install_linux_source.html.txt ยท Last modified: 2016/02/03 by admin

Page Tools