Home 〉 Ramblings ⁄ Setups ∴ Configuration
and ignore the additional configuration instructions (the bootstrap script carries out these instructions for you).
Install Passenger on Ubuntu Intrepid 8.10
Published: February 14, 2009 (about 5 years ago)Phusion Passenger is one of the easiest Rails and Rack environments to set up and configure with Apache2. With my bootstrapping scripts, the ability to establish a Virtual machine image and have a working Rails application on it in minutes is a reality. Here is how I do it.
Bootstrap PassengerBegin by Bootstrapping Ubuntu. The next step is to run the script for installing Passenger. The standard passenger install against the standard Ruby 1.8.7 package managed libraries are installed with the following: (assuming you've downloaded the bootstrap scripts and are in the ~/bootstrap-scripts/ubuntu/intrepid folder already, execute the following script:
./bootstrap-passenger-std.shPassenger's install prompts you two or three times. Simply press
Set up a demo Rails project
cd /var/www sudo mkdir rails cd rails sudo rails demo cd .. chown -R www-data:www-data rails
Set up a Virtual Host EntryApache2 on Ubuntu makes it fairly straightforward to set up a provider for the Rails application, simply create the following in /etc/apache2/sites-available/demo:
<VirtualHost *:80> ServerName localhost DocumentRoot /var/www/rails/demo/public </VirtualHost>And then enable the site:
sudo a2ensite demo sudo /etc/init.d/apache2 reload
End ResultIf all goes well, you should then be able to browse to http://localhost and see the rails greet page. Your system will look something like this:
OS: 2.6.27-7-server x86_64 GNU/Linux Apache: Server version: Apache/2.2.9 (Ubuntu) Passenger: 2.0.6 Ruby: ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux] Rubygems: 1.3.1 gems: - actionmailer (2.2.2) - actionpack (2.2.2) - activerecord (2.2.2) - activeresource (2.2.2) - activesupport (2.2.2) - fastthread (1.0.1) - passenger (2.0.6) - plist (3.0.0) - rack (0.9.1) - rails (2.2.2) - rake (0.8.3)
Where to go from here?After you have Passenger working, you may be interested in trying it with the so-called Enterprise version of Ruby which claims 33% memory footprint reduction overall for a typical Rails application. If so, you can flip over to the Enterprise version by running the following bootstrap script:
./bootstrap-passenger-ent.shThis script will download and compile Enterprise Ruby and install Passenger against this version of Ruby, disabling the standard passenger modules in Apache (if they're installed as per above) in the process. Does it make any real difference? We shall see! I am benchmarking performance of both standard and enterprise and will be reporting on my findings soon.