This is how I used to setup my server after a clean install... back in `08 or something...

if [ $USER != 'root' ]
        echo "You aren't root."
        exit 1

APT_OPTIONS='-qq' #implies --yes --quiet
WGET_OPTIONS='--no-verbose --quiet --output-document /tmp/server-ubuntu.log'

echo "Minor house-keeping before starting..."
apt-get $APT_OPTIONS autoremove
apt-get $APT_OPTIONS autoclean

## BASICS ##
tasksel install server
tasksel install lamp-server
tasksel install openssh-server

## PHP ##
apt-get install php5-cli

## RAILS ##

# Install prefork compatible passenger to work alongside php
sh -c 'echo "deb hardy main" > /etc/apt/sources.list.d/brightbox.list'
sh -c 'wget -q -O - | apt-key add -'
apt-get update
apt-get install libapache2-mod-passenger rails libwww-mechanize-ruby
apt-get $APT_OPTIONS install \
   rubygems \
   ruby-dev \
   libxslt-dev \
   libopenssl-ruby \
   libpdf-writer-ruby \
   libtransaction-simple-ruby \
gem install mechanize hoe
gem install fastthread
gem update

# OR install PHP through fastcgi
#sudo apt-get install apache2-mpm-worker libapache2-mod-fcgid php5-cgi

By AJ ONeal

If you loved this and want more like it, sign up!

Did I make your day?
Buy me a coffeeBuy me a coffee  

(you can learn about the bigger picture I'm working towards on my patreon page )



Buy me a coffeeBuy me a coffee

  73% of Goal Reached

Want more like this?