Skip to content

Instantly share code, notes, and snippets.

@mustafaturan
Last active March 2, 2016 00:22
Show Gist options
  • Save mustafaturan/3712951 to your computer and use it in GitHub Desktop.
Save mustafaturan/3712951 to your computer and use it in GitHub Desktop.
rbenv centos setup
#!/usr/bin/env bash
# repository
#cd /tmp
#wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
#rpm -Uvh epel-release-6-8.noarch.rpm
# system update
yum -y update
yum -y groupinstall "Development Tools"
yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git memcached-devel valgrind-devel mysql-devel
# for jruby
yum -y install java-1.7.0-openjdk java-1.7.0-openjdk-devel
# add user deployer
adduser deployer
sudo su deployer
# add authorized keys (optional)
cd
mkdir .ssh
touch .ssh/authorized_keys
chmod 0700 .ssh
chmod 0400 .ssh/authorized_keys
# setup rbenv
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH:/usr/local/bin"' >> ~/.bash_profile
echo "alias sudo='sudo env PATH=$PATH'" >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
exec $SHELL
# ruby-build
mkdir -p ~/.rbenv/plugins
cd ~/.rbenv/plugins
git clone git://github.com/sstephenson/ruby-build.git
# quit deployer
exit
# quit
exit
@jc-was-here
Copy link

Freakin' awesome, mate. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment