Skip to content

Instantly share code, notes, and snippets.

@redfit
Forked from masa-ita/compile_ruby_on_centos.sh
Created August 16, 2012 16:39
Show Gist options
  • Select an option

  • Save redfit/3371540 to your computer and use it in GitHub Desktop.

Select an option

Save redfit/3371540 to your computer and use it in GitHub Desktop.
Compile Ruby 1.9.3 on CentOS 5 from source files
#!/bin/bash
# install packages needed to compile ruby
sudo yum -y install make gcc-c++ zlib-devel openssl-devel \
readline-devel gdbm-devel bison \
libffi-devel wget
# you should register EPEL repository to install libyaml
sudo rpm -Uvh http://ftp-srv2.kddilabs.jp/Linux/distributions/fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm
sudo yum -y install libyaml-devel
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
tar xvzf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194
./configure --prefix=/usr/local
sudo make
sudo make install
sudo yum update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment