Skip to content

Instantly share code, notes, and snippets.

@rubemlrm
Created April 20, 2016 14:53
Show Gist options
  • Save rubemlrm/c7e885301909050e2c9ee66e34a1187a to your computer and use it in GitHub Desktop.
Save rubemlrm/c7e885301909050e2c9ee66e34a1187a to your computer and use it in GitHub Desktop.
rvm small setup
!/usr/bin/env bash
echo "welcome to ruby server conf"
echo "updating repos"
sudo apt-get update --fix-missing
echo "Installing build-essential and curl"
sudo apt-get install -y build-essential
sudo apt-get install -y curl git rsync
echo "setup mysql"
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password teste123'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password teste123'
sudo apt-get -y install mysql-server
sudo apt-get -y install mysql-client
echo "create database myogin;" | mysql -uroot -pteste123
echo "setup nodejs"
sudo apt-get install -y nodejs
echo "install rvm"
chmod -R 777 /home/vagrant/.gnupg
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
cd /home/vagrant
curl -sSL https://get.rvm.io | bash -s stable --ruby
echo "config rvm and libs"
echo "source /home/vagrant/.rvm/scripts/rvm" >> ~/.bashrc
source ~/.bashrc
echo "creating global gemset"
rvm gemset create global
rvm gemset use global
gem install bundler
gem install passenger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment