Skip to content

Instantly share code, notes, and snippets.

@gullitmiranda
Last active December 18, 2015 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gullitmiranda/5835638 to your computer and use it in GitHub Desktop.
Save gullitmiranda/5835638 to your computer and use it in GitHub Desktop.
#!/bin/sh
echo "##### Mudando para o usuário root"
sudo su -
echo "##### Atualizando yum"
yum update -y
echo "##### Instalando git pcre pcre-devel"
yum install -y git pcre pcre-devel
echo "##### Instalando rbenv"
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
echo 'export RBENV_ROOT=/usr/local/rbenv
export PATH="${RBENV_ROOT}/bin:$PATH"
eval "$(rbenv init -)"' > /etc/profile.d/rbenv.sh
echo "#### Recarregando profile"
. /etc/profile
echo "#### Instalando ruby-build"
git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build
echo "#### Instalando ruby 2.0.0-p195"
rbenv install 2.0.0-p195
rbenv global 2.0.0-p195
rbenv rehash
echo "#### Gems bundler e passenger"
gem update --system
gem install bundler
gem install passenger
echo "#### Interrompendo serviço do passenger"
service passenger stop
echo "#### Adicionando rbenv a inicialização do sistema"
echo ". /etc/profile.d/rbenv.sh" >> /opt/elasticbeanstalk/support/envvars.d/appenv
echo "#### Iniciando serviço do passenger manualmente"
service passenger start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment