Forked from maran/Unattended Rails (Passenger, Ruby Enterprise) Stack
Created
December 22, 2008 21:59
-
-
Save shanesveller/39143 to your computer and use it in GitHub Desktop.
No changes here yet, this is just for my own reference
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 | |
VERSION="1.1" | |
REEV="http://rubyforge.org/frs/download.php/58677/ruby-enterprise-1.8.6-20090610.tar.gz" | |
REEF="ruby-enterprise-1.8.6-20090610.tar.gz" | |
REEFF=${REEF%".tar.gz"} | |
PASSENGER="2.2.4" | |
echo "#####################################" | |
echo "Welcome, let's get this party rollin'" | |
echo "#####################################" | |
echo "Updating Aptitude" | |
sudo apt-get update | |
echo "Installing build essentials" | |
sudo apt-get install build-essential zlib1g-dev libssl-dev wget -y | |
echo "Installing GIT" | |
sudo apt-get install -y git-core | |
echo "Installing apache" | |
sudo apt-get install -y apache2 | |
echo "Installing apache headers" | |
sudo apt-get install -y apache2-prefork-dev | |
echo "Installing Ruby Enterprise from following url" | |
echo $REEV | |
wget $REEV | |
if [ -e $REEF ] | |
then | |
echo "File downloaded succesful" | |
else | |
echo "Error, file wasn't downloaded!" | |
exit | |
fi | |
tar -zxvf $REEF | |
# possible options perhaps for checker | |
# --extra rails --no-tcmalloc | |
if [ -d ./$REEFF ] | |
then | |
sudo ./$REEFF/installer --auto /opt/ruby | |
echo "Dir test" | |
else | |
echo "Dir not found, exiting.." | |
exit | |
fi | |
echo "Creating ruby symlinks" | |
sudo ln -s /opt/ruby/bin/ruby /usr/bin/ruby | |
sudo ln -s /opt/ruby/bin/gem /usr/bin/gem | |
sudo ln -s /opt/ruby/bin/rake /usr/bin/rake | |
sudo ln -s /opt/ruby/bin/rails /usr/bin/rails | |
echo "Installing other gems" | |
sudo gem install rails | |
sudo gem install will_paginate | |
sudo gem install shoulda | |
sudo gem install mysql | |
echo "Installing passenger" | |
sudo gem install passenger -v=$PASSENGER | |
echo "Config passenger" | |
yes '' | sudo /opt/ruby/bin/passenger-install-apache2-module | |
#sudo /opt/ruby/bin/passenger-install-apache2-module | |
echo "Copying passenger files" | |
sudo bash -c 'touch /etc/apache2/mods-available/passenger.load' | |
sudo bash -c 'touch /etc/apache2/mods-available/passenger.conf' | |
sudo bash -c 'echo "LoadModule passenger_module /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.4/ext/apache2/mod_passenger.so" >> /etc/apache2/mods-available/passenger.load' | |
sudo bash -c 'echo "PassengerRoot /opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.4 | |
PassengerRuby /opt/ruby/bin/ruby" >> /etc/apache2/mods-available/passenger.conf' | |
echo "Enabling passenger module" | |
sudo a2enmod passenger | |
echo "Reloading apache" | |
sudo /etc/init.d/apache2 reload | |
echo "##########################" | |
echo "# Installation Complete" | |
echo "##########################" | |
sleep 2 | |
echo "##########################" | |
echo "# Installed Ruby Version #" | |
echo "##########################" | |
ruby -v | |
echo "##########################" | |
echo "# Installed Gems Version #" | |
echo "##########################" | |
gem -v | |
sudo /opt/ruby/bin/passenger-status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment