So, I've been hacking on a new RoR application for work for the last week or so, and it's time to get a deployment environment set up so I can deploy as rapidly as I can develop. I've been reading Agile Development With Rails and whilst perusing the chapter on deployment, ran across this site which explains the ins and outs of installing Apache/Mongrel/Capistrano in a deployment configuration on Debian Sarge. Since I am deploying to an Ubuntu Feisty install, I decided that these instructions are likely close to what I'm after.
Here, then, are my notes about what I had to do to finish the install:
First, there are several differences between Debian Sarge and Ubuntu Feisty, most notably you don't have to add any extra repositories to get things installed properly. Here's my /etc/apt/sources.list:
deb http://us.archive.ubuntu.com/ubuntu/ feisty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ feisty main restricted
deb http://us.archive.ubuntu.com/ubuntu/ feisty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ feisty-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ feisty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ feisty universe
deb http://us.archive.ubuntu.com/ubuntu/ feisty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ feisty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu feisty-security main restricted
deb-src http://security.ubuntu.com/ubuntu feisty-security main restricted
deb http://security.ubuntu.com/ubuntu feisty-security universe
deb-src http://security.ubuntu.com/ubuntu feisty-security universe
deb http://security.ubuntu.com/ubuntu feisty-security multiverse
deb-src http://security.ubuntu.com/ubuntu feisty-security multiverse
This is the default sources.list from Feisty, with the comments removed and the multiverse repositories enabled. With these.
Also note - this machine is already in production with Apache2 configured and running, so I've only got to get Ruby, Rails, Mongrel, and Capistrano configured.
Get the repositories up to date:
apt-get update
Now that I'm up to date, I refer back to the [tutorial on how to do this in Debian](http://mongrel.rubyforge.org/docs/debian-sarge.html) and discover which packages I should install first. They are:
ruby irb rdoc ri ruby1.8-dev libzlib-ruby libopenssl-ruby rubygems build-essential
So, since I tend to like to see what will happen before I actually make changes via apt, I run:
apt-get install ruby irb rdoc ri ruby1.8-dev libzlib-ruby libopenssl-ruby rubygems
build-essential --recon
Which reports:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
binutils dpkg-dev g++ g++-4.1 gcc gcc-4.1 irb1.8 libgems-ruby1.8 libopenssl-ruby1.8
libreadline-ruby1.8 libruby1.8 libstdc++6-4.1-dev make patch rdoc1.8 ri1.8 ruby1.8
Suggested packages:
binutils-doc debian-keyring gcc-4.1-doc manpages-dev autoconf automake1.9 libtool
flex bison gdb gcc-doc gcc-4.1-locales libc6-dev-i386 libstdc++6-4.1-doc make-doc diff-doc
ruby1.8-examples
Recommended packages:
libmudflap0-dev
The following NEW packages will be installed:
binutils build-essential dpkg-dev g++ g++-4.1 gcc gcc-4.1 irb irb1.8 libgems-ruby1.8
libopenssl-ruby libopenssl-ruby1.8 libreadline-ruby1.8 libruby1.8 libstdc++6-4.1-dev
libzlib-ruby make patch rdoc rdoc1.8 ri ri1.8 ruby ruby1.8 ruby1.8-dev rubygems
0 upgraded, 26 newly installed, 0 to remove and 0 not upgraded.
Inst binutils (2.17.20070103cvs-0ubuntu2 Ubuntu:7.04/feisty)
Inst gcc-4.1 (4.1.2-0ubuntu4 Ubuntu:7.04/feisty)
Inst gcc (4:4.1.2-1ubuntu1 Ubuntu:7.04/feisty)
Inst libstdc++6-4.1-dev (4.1.2-0ubuntu4 Ubuntu:7.04/feisty) []
Inst g++-4.1 (4.1.2-0ubuntu4 Ubuntu:7.04/feisty)
Inst g++ (4:4.1.2-1ubuntu1 Ubuntu:7.04/feisty)
Inst make (3.81-3build1 Ubuntu:7.04/feisty)
Inst patch (2.5.9-4 Ubuntu:7.04/feisty)
Inst dpkg-dev (1.13.24ubuntu6 Ubuntu:7.04/feisty)
Inst build-essential (11.3 Ubuntu:7.04/feisty)
Inst libruby1.8 (1.8.5-4ubuntu2 Ubuntu:7.04/feisty)
Inst ruby1.8 (1.8.5-4ubuntu2 Ubuntu:7.04/feisty)
Inst libreadline-ruby1.8 (1.8.5-4ubuntu2 Ubuntu:7.04/feisty)
Inst irb1.8 (1.8.5-4ubuntu2 Ubuntu:7.04/feisty)
Inst irb (1.8.2-1 Ubuntu:7.04/feisty)
Inst rdoc1.8 (1.8.5-4ubuntu2 Ubuntu:7.04/feisty)
Inst libopenssl-ruby1.8 (1.8.5-4ubuntu2 Ubuntu:7.04/feisty)
Inst libgems-ruby1.8 (0.9.0-5 Ubuntu:7.04/feisty)
Inst libopenssl-ruby (1.0.0+ruby1.8.2-1 Ubuntu:7.04/feisty)
Inst libzlib-ruby (0.6.0+ruby1.8.2-1 Ubuntu:7.04/feisty)
Inst rdoc (1.8.2-1 Ubuntu:7.04/feisty)
Inst ri1.8 (1.8.5-4ubuntu2 Ubuntu:7.04/feisty)
Inst ri (1.8.2-1 Ubuntu:7.04/feisty)
Inst ruby (1.8.2-1 Ubuntu:7.04/feisty)
Inst ruby1.8-dev (1.8.5-4ubuntu2 Ubuntu:7.04/feisty)
Inst rubygems (0.9.0-5 Ubuntu:7.04/feisty)
Conf binutils (2.17.20070103cvs-0ubuntu2 Ubuntu:7.04/feisty)
Conf gcc-4.1 (4.1.2-0ubuntu4 Ubuntu:7.04/feisty)
Conf gcc (4:4.1.2-1ubuntu1 Ubuntu:7.04/feisty)
Conf g++-4.1 (4.1.2-0ubuntu4 Ubuntu:7.04/feisty)
Conf libstdc++6-4.1-dev (4.1.2-0ubuntu4 Ubuntu:7.04/feisty)
Conf g++ (4:4.1.2-1ubuntu1 Ubuntu:7.04/feisty)
Conf make (3.81-3build1 Ubuntu:7.04/feisty)
Conf patch (2.5.9-4 Ubuntu:7.04/feisty)
Conf dpkg-dev (1.13.24ubuntu6 Ubuntu:7.04/feisty)
Conf build-essential (11.3 Ubuntu:7.04/feisty)
Conf libruby1.8 (1.8.5-4ubuntu2 Ubuntu:7.04/feisty)
Conf ruby1.8 (1.8.5-4ubuntu2 Ubuntu:7.04/feisty)
Conf libreadline-ruby1.8 (1.8.5-4ubuntu2 Ubuntu:7.04/feisty)
Conf irb1.8 (1.8.5-4ubuntu2 Ubuntu:7.04/feisty)
Conf irb (1.8.2-1 Ubuntu:7.04/feisty)
Conf rdoc1.8 (1.8.5-4ubuntu2 Ubuntu:7.04/feisty)
Conf libopenssl-ruby1.8 (1.8.5-4ubuntu2 Ubuntu:7.04/feisty)
Conf libgems-ruby1.8 (0.9.0-5 Ubuntu:7.04/feisty)
Conf libopenssl-ruby (1.0.0+ruby1.8.2-1 Ubuntu:7.04/feisty)
Conf libzlib-ruby (0.6.0+ruby1.8.2-1 Ubuntu:7.04/feisty)
Conf rdoc (1.8.2-1 Ubuntu:7.04/feisty)
Conf ri1.8 (1.8.5-4ubuntu2 Ubuntu:7.04/feisty)
Conf ri (1.8.2-1 Ubuntu:7.04/feisty)
Conf ruby (1.8.2-1 Ubuntu:7.04/feisty)
Conf ruby1.8-dev (1.8.5-4ubuntu2 Ubuntu:7.04/feisty)
Conf rubygems (0.9.0-5 Ubuntu:7.04/feisty)
Ok, that all looks good, so off we go to let it actually run. I'm going to go re-fill my water bottle.
Zzzzz......
Alright, that's done. Up next is to install rails, mongrel, capistrano, and other supporting software via gem:
root# gem install rails --include-dependencies
root# gem install termios --include-dependencies
root# gem install capistrano --include-dependencies
root# gem install mongrel --include-dependencies
root# gem install mongrel_cluster --include-dependencies
Important Note: I had to choose which version of mongrel to install, as well as which version of fastthread, which is a dependancy of mongrel. Simply choose the lowest numbered gem offered for your platform.
At this point, we should have a working Rails installation. To test it, we'll follow a few more instructions from the