Skip to content

Instantly share code, notes, and snippets.

@shim0mura
Last active August 29, 2015 13:56
Show Gist options
  • Save shim0mura/8818849 to your computer and use it in GitHub Desktop.
Save shim0mura/8818849 to your computer and use it in GitHub Desktop.
yum update -y
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel openssl-devel make bzip2 autoconf automake libtool bison git
MY_GROUP="rbenv"
if [ "$MY_GROUP" = "" ] ; then
echo '!!! undefined variable MY_GROUP.'
echo '!!!'
echo '!!! ex.) MY_GROUP=staff'
echo '!!!'
exit 1
fi
cd /usr/local
git clone git://github.com/sstephenson/rbenv.git rbenv
mkdir rbenv/shims rbenv/versions
touch rbenv/version
chgrp -R $MY_GROUP rbenv
chmod -R g+rwxX rbenv
chmod -R 2775 rbenv/versions
git clone git://github.com/sstephenson/ruby-build.git ruby-build
cd ruby-build
./install.sh
echo 'export RBENV_ROOT="/usr/local/rbenv"' >> /etc/profile.d/rbenv.sh
echo 'export PATH="/usr/local/rbenv/bin:$PATH"' >> /etc/profile.d/rbenv.sh
echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment