Skip to content

Instantly share code, notes, and snippets.

@masa-ita
Created June 30, 2012 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save masa-ita/3023767 to your computer and use it in GitHub Desktop.
Save masa-ita/3023767 to your computer and use it in GitHub Desktop.
Compile Ruby 1.9.3 on CentOS 6.2 from source files
#!/bin/bash
# install packages needed to compile ruby
yum -y install make gcc zlib-devel openssl-devel \
readline-devel gdbm-devel bison \
libffi-devel wget
# you should register EPEL repository to install libyaml
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm
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
make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment