Skip to content

Instantly share code, notes, and snippets.

@ohshhh
Last active August 29, 2015 14:08
Show Gist options
  • Save ohshhh/5bce1d4d2c6cf90aaa3f to your computer and use it in GitHub Desktop.
Save ohshhh/5bce1d4d2c6cf90aaa3f to your computer and use it in GitHub Desktop.
centos ruby 1.9.3 p547 instal
# Enable EPEL repo
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
or
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# Install build prereqs
yum -y groupinstall "Development Tools"
yum -y install libyaml libyaml-devel readline-devel ncurses-devel gdbm-devel tcl-devel openssl-devel db4-devel libffi-devel ImageMagick-devel libuuid-devel zlib-devel curl-devel openssl-devel httpd-devel apr-devel mysql-devel
# Set up rpmbuild environment
mkdir -p rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
# download the source
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p547.tar.gz -P rpmbuild/SOURCES
# download the spec file
wget https://raw.github.com/imeyer/ruby-1.9.3-rpm/master/ruby19.spec -P rpmbuild/SPECS
# build the RPM
rpmbuild -bb rpmbuild/SPECS/ruby19.spec
# install the RPM
rpm -Uvh rpmbuild/RPMS/x86_64/ruby-1.9.3p547-1.el6.x86_64.rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment