Skip to content

Instantly share code, notes, and snippets.

@maddox
Created September 12, 2008 03:18
Show Gist options
  • Save maddox/10367 to your computer and use it in GitHub Desktop.
Save maddox/10367 to your computer and use it in GitHub Desktop.
# install vim so that you can use it to edit stuff from a mac
apt-get update
apt-get install vim
# as root add your user
adduser deployer
# add admin group
addgroup admin
# add your user to admin group
adduser deployer admin
# add your user to sudoers
chmod +w /etc/sudoers
vi /etc/sudoers
chmod -w /etc/sudoers
# add this to the bottom
root ALL=(ALL) ALL
%admin ALL=(ALL) ALL
# house keeping
sudo apt-get install build-essential
# git and subversion
sudo apt-get install git-core
# ruby and friends
sudo apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8 libreadline-ruby1.8 libruby1.8 libopenssl-ruby rake
sudo ln -s /usr/bin/ruby1.8 /usr/local/bin/ruby
sudo ln -s /usr/bin/ri1.8 /usr/local/bin/ri
sudo ln -s /usr/bin/rdoc1.8 /usr/local/bin/rdoc
sudo ln -s /usr/bin/irb1.8 /usr/local/bin/irb
# stuff
sudo apt-get install postfix mysql-server libmysqlclient15-dev
# ruby gems
wget http://rubyforge.org/frs/download.php/35283/rubygems-1.1.1.tgz
tar xfz rubygems-1.1.1.tgz
cd rubygems-1.1.1
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
sudo gem update --system
# imagemagick
sudo apt-get install imagemagick libmagick++9-dev
# Rails
sudo gem install --no-rdoc --no-ri rails
# Some ruby gems
sudo gem install --no-rdoc --no-ri daemons mysql gem_plugin --include-dependencies
# install thin
sudo gem install thin
## create runlevel script and add it to the default runlevels
sudo thin install
sudo /usr/sbin/update-rc.d -f thin defaults
## create thin config
sudo thin config -C /etc/thin/APP_NAME.yml -c /home/deployer/apps/APP_NAME_/current --servers 2 -e production
# yay! /etc/init.d/thin start
# download and compile nginx
## install deps
sudo apt-get install libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev
# download and install nginx
wget http://sysoev.ru/nginx/nginx-0.6.30.tar.gz
tar xfz nginx-0.6.30.tar.gz
cd nginx-0.6.30
./configure --sbin-path=/usr/local/sbin --with-http_ssl_module
make
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment