Last active
March 2, 2016 00:22
-
-
Save mustafaturan/3712951 to your computer and use it in GitHub Desktop.
rbenv centos setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Freakin' awesome, mate. Cheers!