Skip to content

Instantly share code, notes, and snippets.

@tom2cjp
Forked from alvin2ye/install_ror
Created November 23, 2010 00:34
Show Gist options
  • Save tom2cjp/711014 to your computer and use it in GitHub Desktop.
Save tom2cjp/711014 to your computer and use it in GitHub Desktop.
#! /bin/bash
read -p "install ruby enterprise_1.8.7 "
[ "$REPLY" == "y" ] && wget http://rubyforge.org/frs/download.php/68718/ruby-enterprise_1.8.7-2010.01_i386.deb -O /tmp/ruby-enterprise_1.8.7-2010.01_i386.deb && sudo dpkg -i
read -p "apt-get update "
[ "$REPLY" == "y" ] && sudo apt-get update && sudo apt-get upgrade
read -p "Remove /tmp/ruby-enterprise_1.8.7-2010.01_i386.deb (y/n)?"
[ "$REPLY" == "y" ] && rm /tmp/ruby-enterprise_1.8.7-2010.01_i386.deb
echo "Add gem source "
sudo gem sources --add http://gemcutter.org
read -p "Install rails (y/n)?"
[ "$REPLY" == "y" ] && sudo gem install rails --source http://gemcutter.org
read -p "Install sqlite3 and ruby-sqlite3(y/n)?"
# yum install ruby-devel sqlite-devel
[ "$REPLY" == "y" ] && sudo apt-get install sqlite3 swig libsqlite3-ruby libsqlite3-dev && sudo gem install sqlite3-ruby
read -p "Install apache2 (y/n)?"
[ "$REPLY" == "y" ] && sudo apt-get install apache2 apache2-prefork-dev libapr1-dev libaprutil1-dev
read -p "Install mysql5 (y/n)?"
[ "$REPLY" == "y" ] && sudo apt-get install mysql-server mysql-client libmysqlclient15-dev
read -p "Install git-core(y/n)?"
[ "$REPLY" == "y" ] && sudo apt-get install git-core
read -p "Install passenger(y/n)?"
[ "$REPLY" == "y" ] && sudo apt-get install libxml2 libxml2-dev libxslt1-dev && gem install passenger && sudo passenger-install-apache2-module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment