Last active
August 29, 2015 14:01
-
-
Save satbirdd/89b4e06080f77208235b to your computer and use it in GitHub Desktop.
This file contains 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
# !/bin/bash | |
# postgresql apt-get repository | |
# sudo touch /etc/apt/sources.list.d/pgdg.list | |
# echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee -a /etc/apt/sources.list.d/pgdg.list | |
# wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
# redis apt-get repository | |
echo "deb http://archive.ubuntu.com/ubuntu precise main universe" | sudo tee -a /etc/apt/sources.list | |
sudo apt-get update | |
######################################### | |
# This will install git | |
######################################### | |
sudo apt-get -y install git | |
######################################### | |
# This will install make | |
######################################### | |
sudo apt-get -y install make | |
######################################### | |
# This will install ruby 2.1.1 | |
######################################### | |
RUBY_RUL="http://ruby.taobao.org/mirrors/ruby/2.1/ruby-2.1.1.tar.bz2" | |
RUBY_TGZ="ruby-2.1.1.tar.bz2" | |
RUBY_DIR="ruby-2.1.1" | |
wget $RUBY_RUL | |
tar xvf $RUBY_TGZ | |
cd $RUBY_DIR | |
./configure | |
make | |
sudo make install | |
cd | |
######################################### | |
# This will install mysql | |
######################################### | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password ' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password ' | |
# mysql server | |
sudo apt-get -y install mysql-server | |
# mysql client | |
sudo apt-get -y install mysql-client | |
# mysql2 gem dependence | |
sudo apt-get -y install libmysqlclient-dev | |
######################################### | |
# This will install postgresql | |
######################################### | |
# sudo apt-get install -y postgresql-9.3 | |
######################################### | |
# This will install nodejs | |
######################################### | |
NODE_RUL="http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz" | |
NODE_TGZ="node-v0.10.28.tar.gz" | |
NODE_DIR="node-v0.10.28" | |
wget -q $NODE_RUL | |
tar zxf $NODE_TGZ | |
cd $NODE_DIR | |
./configure | |
sudo make | |
sudo make install | |
cd | |
######################################### | |
# This will install redis, | |
# and download a pre-configured config | |
######################################### | |
sudo apt-get -y install redis-server | |
sudo gem install bundler | |
cd /vagrant | |
bundle | |
bundle exec rake db:create RAILS_ENV=production | |
bundle exec rake db:migrate RAILS_ENV=production | |
bundle exec sidekiq | |
rails s -p 5000 -e production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment