<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Perplexed Labs &#187; apache</title>
	<atom:link href="http://blog.perplexedlabs.com/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.perplexedlabs.com</link>
	<description>web development war stories from the frontlines to the backend</description>
	<lastBuildDate>Mon, 16 May 2011 14:19:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Installing Ruby Enterprise Edition with Phusion Passenger</title>
		<link>http://blog.perplexedlabs.com/2009/01/13/installing-ruby-enterprise-edition-with-phusion-passenger/</link>
		<comments>http://blog.perplexedlabs.com/2009/01/13/installing-ruby-enterprise-edition-with-phusion-passenger/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 15:00:18 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[phusion]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby enterprise edition]]></category>

		<guid isPermaLink="false">http://www.perplexedlabs.com/?p=121</guid>
		<description><![CDATA[I've been using Phusion Passenger for a few months now and I'm really pleased with it.  The performace vs. Mongrel is better, but what makes it so useful is the ease of deployment.  Being able to setup a vhost in Apache just like you would for a PHP application was very appealing to me.  Having [...]


Related posts:<ol><li><a href='http://blog.perplexedlabs.com/2010/02/08/deployment-using-capistrano-and-webistrano-via-rails-and-phusion-passenger/' rel='bookmark' title='Permanent Link: Deployment Using Capistrano / Webistrano via Rails / Phusion Passenger'>Deployment Using Capistrano / Webistrano via Rails / Phusion Passenger</a></li>
<li><a href='http://blog.perplexedlabs.com/2008/02/04/building-a-rails-capable-slice-from-scratch/' rel='bookmark' title='Permanent Link: Ruby On Rails and SliceHost Part 1: Initial Setup'>Ruby On Rails and SliceHost Part 1: Initial Setup</a></li>
<li><a href='http://blog.perplexedlabs.com/2009/07/31/twitter-and-sd-news/' rel='bookmark' title='Permanent Link: Twitter and SD News'>Twitter and SD News</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I've been using <a href="http://www.modrails.com/">Phusion Passenger</a> for a few months now and I'm really pleased with it.  The performace vs. Mongrel is better, but what makes it so useful is the ease of deployment.  Being able to setup a vhost in Apache just like you would for a PHP application was very appealing to me.  Having previously worked with the Apache/Rails/Mongrel/mod_proxy stack in an "enterprise" environment for over a year, I have experienced pretty much every nightmare deployment scenario possible.  I recently decided to install Phusion's <a href="http://www.rubyenterpriseedition.com/">Ruby Enterprise Edition</a>, which promises up to a 33% savings in memory usage.</p>
<p>Before you do anything, and to save you trouble down the road, I recommend generating a list of all the gems currently installed.  You'll need this later because you'll have to reinstall all of them in Ruby Enterprise Edition.</p>
<blockquote><p>$ gem list</p>
<p>*** LOCAL GEMS ***</p>
<p>actionmailer (2.0.2)<br />
actionpack (2.0.2)<br />
activerecord (2.0.2)<br />
activeresource (2.0.2)<br />
activesupport (2.0.2)<br />
acts_as_taggable (2.0.2)<br />
amazon-ecs (0.5.3)<br />
cgi_multipart_eof_fix (2.5.0)<br />
daemons (1.0.10)<br />
fastthread (1.0.1)<br />
gem_plugin (0.2.3)<br />
hpricot (0.6)<br />
mongrel (1.1.4)<br />
mysql (2.7)<br />
passenger (1.0.1)<br />
rails (2.0.2)<br />
rake (0.8.1)<br />
rspec (1.1.3)<br />
will_paginate (2.2.2)<br />
xml-simple (1.0.11)</p></blockquote>
<p>Copy your list and save it somewhere.  Next, we download and extract the current version of Ruby Enterprise Edition.  The latest version number can be found at the <a href="http://www.rubyenterpriseedition.com/download.html">download page</a>.</p>
<blockquote><p>$ wget http://rubyforge.org/frs/download.php/48623/ruby-enterprise-1.8.6-20081215.tar.gz<br />
$ tar xzvf ruby-enterprise-1.8.6-20081215.tar.gz</p></blockquote>
<p>And run the installer</p>
<blockquote><p>$ ./ruby-enterprise-1.8.6-20081215/installer</p></blockquote>
<p>As the installation proceeds, you'll be prompted for an installation directory.  I went with the default.  When the installation is over, you should see a message like this:</p>
<blockquote><p>Ruby Enterprise Edition is successfully installed!<br />
If want to use Phusion Passenger (http://www.modrails.com) in combination<br />
with Ruby Enterprise Edition, then you must reinstall Phusion Passenger against<br />
Ruby Enterprise Edition, as follows:</p>
<p>/opt/ruby-enterprise-1.8.6-20081215/bin/passenger-install-apache2-module</p>
<p>Make sure you don't forget to paste the Apache configuration directives that<br />
the installer gives you.</p>
<p>If you ever want to uninstall Ruby Enterprise Edition, simply remove this<br />
directory:</p>
<p>/opt/ruby-enterprise-1.8.6-20081215</p>
<p>If you have any questions, feel free to visit our website:</p>
<p>http://www.rubyenterpriseedition.com</p>
<p>Enjoy Ruby Enterprise Edition, a product of Phusion (www.phusion.nl)</p></blockquote>
<p>I do want to use Ruby Enterprise Edition and Apache, so I immediately installed the Apache module.</p>
<blockquote><p>$ /opt/ruby-enterprise-1.8.6-20081215/bin/passenger-install-apache2-module</p></blockquote>
<p>You need to pay attention to the Apache directives that this installation generates, since you'll have to put them into your httpd.conf:</p>
<blockquote><p>The Apache 2 module was successfully installed.</p>
<p>Please edit your Apache configuration file, and add these lines:</p>
<p>LoadModule passenger_module /opt/ruby-enterprise-1.8.6-20081215/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so<br />
PassengerRoot /opt/ruby-enterprise-1.8.6-20081215/lib/ruby/gems/1.8/gems/passenger-2.0.6<br />
PassengerRuby /opt/ruby-enterprise-1.8.6-20081215/bin/ruby</p></blockquote>
<p>What that message doesn't explain is that, if you previously installed Passenger <strong>without</strong> Ruby Enterprise Edition, you need to comment out any old directives attached to that previous setup.  I made that mistake the first time around.</p>
<p>Next you have to reinstall all the gems that you were using with old Ruby, including Rails:</p>
<blockquote><p>/opt/ruby-enterprise-1.8.6-20081215/bin/ruby /opt/ruby-enterprise-1.8.6-20081215/bin/gem install rails --version 2.0.2</p></blockquote>
<p>Just to prove my point, if you listed all of Enterprise Ruby's gems at this point, the list would look something like this:</p>
<blockquote><p>$ /opt/ruby-enterprise-1.8.6-20081215/bin/ruby /opt/ruby-enterprise-1.8.6-20081215/bin/gem list</p>
<p>*** LOCAL GEMS ***</p>
<p>actionmailer (2.2.2, 2.0.2)<br />
actionpack (2.2.2, 2.0.2)<br />
activerecord (2.2.2, 2.0.2)<br />
activeresource (2.2.2, 2.0.2)<br />
activesupport (2.2.2, 2.0.2)<br />
fastthread (1.0.1)<br />
mysql (2.7)<br />
passenger (2.0.6)<br />
rack (0.9.1)<br />
rails (2.2.2, 2.0.2)<br />
rake (0.8.3)</p></blockquote>
<p>None of my old gems are installed.  Once Rails is installed, you need to reinstall your old gems:</p>
<blockquote><p>$ /opt/ruby-enterprise-1.8.6-20081215/bin/ruby /opt/ruby-enterprise-1.8.6-20081215/bin/gem install will_paginate<br />
$ /opt/ruby-enterprise-1.8.6-20081215/bin/ruby /opt/ruby-enterprise-1.8.6-20081215/bin/gem install xml-simple<br />
$ /opt/ruby-enterprise-1.8.6-20081215/bin/ruby /opt/ruby-enterprise-1.8.6-20081215/bin/gem install hpricot<br />
$ /opt/ruby-enterprise-1.8.6-20081215/bin/ruby /opt/ruby-enterprise-1.8.6-20081215/bin/gem install rmagick</p></blockquote>
<p>And on and on.  If you haven't used Passenger before, check out the <a href="http://www.modrails.com/documentation/Users%20guide.html#_deploying_a_ruby_on_rails_application">Deployment Guide</a>.  If you have used Passenger and your Rails apps are already set up in Apache to take advantage of it's deployment procedures, simply restart Apache.</p>


<p>Related posts:<ol><li><a href='http://blog.perplexedlabs.com/2010/02/08/deployment-using-capistrano-and-webistrano-via-rails-and-phusion-passenger/' rel='bookmark' title='Permanent Link: Deployment Using Capistrano / Webistrano via Rails / Phusion Passenger'>Deployment Using Capistrano / Webistrano via Rails / Phusion Passenger</a></li>
<li><a href='http://blog.perplexedlabs.com/2008/02/04/building-a-rails-capable-slice-from-scratch/' rel='bookmark' title='Permanent Link: Ruby On Rails and SliceHost Part 1: Initial Setup'>Ruby On Rails and SliceHost Part 1: Initial Setup</a></li>
<li><a href='http://blog.perplexedlabs.com/2009/07/31/twitter-and-sd-news/' rel='bookmark' title='Permanent Link: Twitter and SD News'>Twitter and SD News</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.perplexedlabs.com/2009/01/13/installing-ruby-enterprise-edition-with-phusion-passenger/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ruby On Rails and SliceHost Part 1: Initial Setup</title>
		<link>http://blog.perplexedlabs.com/2008/02/04/building-a-rails-capable-slice-from-scratch/</link>
		<comments>http://blog.perplexedlabs.com/2008/02/04/building-a-rails-capable-slice-from-scratch/#comments</comments>
		<pubDate>Mon, 04 Feb 2008 20:42:54 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[slicehost]]></category>

		<guid isPermaLink="false">http://perplexedlabs.com/2008/02/04/building-a-rails-capable-slice-from-scratch/</guid>
		<description><![CDATA[I recently purchased a VPS from SliceHost.com. After ruling out a shared host and deciding on a VPS setup, SliceHost seemed to offer the most for my money. My initial setup is the 256slice, which offers 256mb RAM, 10GB of storage, and 100GB of bandwidth for $20 a month. Being able to build my own [...]


Related posts:<ol><li><a href='http://blog.perplexedlabs.com/2009/01/13/installing-ruby-enterprise-edition-with-phusion-passenger/' rel='bookmark' title='Permanent Link: Installing Ruby Enterprise Edition with Phusion Passenger'>Installing Ruby Enterprise Edition with Phusion Passenger</a></li>
<li><a href='http://blog.perplexedlabs.com/2009/11/15/setup-python-2-6-4-mod_wsgi-2-6-and-django-1-1-1-on-centos-5-3-cpanel/' rel='bookmark' title='Permanent Link: Setup Python 2.6.4, mod_wsgi 2.6, and Django 1.1.1 on CentOS 5.3 (cPanel)'>Setup Python 2.6.4, mod_wsgi 2.6, and Django 1.1.1 on CentOS 5.3 (cPanel)</a></li>
<li><a href='http://blog.perplexedlabs.com/2010/02/08/deployment-using-capistrano-and-webistrano-via-rails-and-phusion-passenger/' rel='bookmark' title='Permanent Link: Deployment Using Capistrano / Webistrano via Rails / Phusion Passenger'>Deployment Using Capistrano / Webistrano via Rails / Phusion Passenger</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I recently purchased a VPS from <a href="http://www.slicehost.com">SliceHost.com</a>. After ruling out a shared host and deciding on a VPS setup, SliceHost seemed to offer the most for my money.   My initial setup is the 256slice, which offers 256mb RAM, 10GB of storage, and 100GB of bandwidth for $20 a month.  Being able to build my own stack from scratch is very appealing, especially as most of my side projects are written in <a href="http://www.rubyonrails.org/">Rails</a>.  My goal was to have <a href="http://httpd.apache.org/">Apache 2.2</a> as a front-end server, proxying requests to <a href="http://mongrel.rubyforge.org/">mongrel</a> or a <a href="http://mongrel.rubyforge.org/docs/mongrel_cluster.html">cluster of mongrels</a>, with <a href="http://dev.mysql.com/downloads/mysql/5.0.html">MySQL 5.0</a> as the database.  Of course I also wanted to have <a href="http://www.ruby-lang.org/en/downloads/">Ruby 1.8.6</a> and Rails 2.0.2.  Another useful, though optional, tool is <a href="http://www.phpmyadmin.net/home_page/index.php">phpMyAdmin</a>.  I am also using <a href="http://www.centos.org/">CentOS 5.0</a>, first because of my familiarity with it and second because it's well documented and supported.  The following is the first of a multipart tutorial about how I set this all up.  In future installments I will detail how to secure and optimize each installation as well as enable Apache proxying and mongrel clustering.</p>
<p><strong>Change the default root password</strong></p>
<blockquote><p>&gt;passwd</p></blockquote>
<p><strong>Update all yum packages</strong></p>
<blockquote><p>&gt;yum update</p></blockquote>
<p><strong>Bring in some standard packages</strong></p>
<blockquote><p>&gt;yum install wget openssl-devel lynx zlib zlib-devel vixie-cron curl lynx subversion make gcc automake</p></blockquote>
<p><strong>Install Apache</strong></p>
<blockquote><p>&gt;yum install httpd</p></blockquote>
<p><strong>Setup your domain records</strong><br />
<a href="http://articles.slicehost.com/2007/10/24/creating-dns-records"> http://articles.slicehost.com/2007/10/24/creating-dns-records</a></p>
<p><strong>Create your VirtualHosts in Apache's httpd.conf</strong><br />
<a href="http://httpd.apache.org/docs/2.2/vhosts"> http://httpd.apache.org/docs/2.2/vhosts</a><br />
Note: Apache's conf directory will be /etc/httpd/conf.  Don't forget to restart Apache after setting up each new vhost:</p>
<blockquote><p>&gt;service httpd restart</p></blockquote>
<p>See <a href="http://mongrel.rubyforge.org/docs/apache.html">http://mongrel.rubyforge.org/docs/apache.html</a> for details on how to get Apache and mongrel to play with each other.</p>
<p><strong>Start Apache</strong></p>
<blockquote><p>&gt;httpd service start</p></blockquote>
<p><strong>Install MySQL</strong></p>
<blockquote><p>&gt;yum install mysql mysql-server</p></blockquote>
<p>See <a href="http://dev.mysql.com/doc/">http://dev.mysql.com/doc/</a> for post-installation instructions (setting up initial accounts, etc.)</p>
<p><strong>Install Ruby (1.8.6)</strong></p>
<blockquote><p>&gt;wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p111.tar.gz<br />
&gt;gzip -d ruby-1.8.6-p111.tar.gz<br />
&gt;tar xvf ruby-1.8.6-p111.tar.gz<br />
&gt;cd ruby-1.8.6-p111.tar.gz<br />
&gt;./configure<br />
&gt;make<br />
&gt;make install</p></blockquote>
<p><strong>Install Ruby Gems (1.0.1)</strong></p>
<blockquote><p>&gt;wget http://rubyforge.org/frs/download.php/29548/rubygems-1.0.1.tgz<br />
&gt;tar xvf rubygems-1.0.1.tgz<br />
&gt;cd rubygems-1.0.1.tgz<br />
&gt;ruby setup.rb</p></blockquote>
<p><strong>Install Rails (2.0.2)</strong></p>
<blockquote><p>&gt;gem install rails --include-dependencies</p></blockquote>
<p><strong>Install Mongrel</strong></p>
<blockquote><p>&gt;gem install mongrel</p></blockquote>
<p><strong>Optional for phpMyAdmin<br />
Install php</strong></p>
<blockquote><p>&gt;yum install php</p></blockquote>
<p><strong>Install php extensions necessary for phpMyAdmin</strong></p>
<blockquote><p>&gt;yum install php-mcrypt<br />
&gt;yum install php-mbstring</p></blockquote>
<p><strong>I</strong><strong>nstall phpmyadmin</strong><br />
<a href="http://www.phpmyadmin.net/documentation/#setup">http://www.phpmyadmin.net/documentation/#setup</a></p>
<p>Any comments or feedback is appreciated.</p>


<p>Related posts:<ol><li><a href='http://blog.perplexedlabs.com/2009/01/13/installing-ruby-enterprise-edition-with-phusion-passenger/' rel='bookmark' title='Permanent Link: Installing Ruby Enterprise Edition with Phusion Passenger'>Installing Ruby Enterprise Edition with Phusion Passenger</a></li>
<li><a href='http://blog.perplexedlabs.com/2009/11/15/setup-python-2-6-4-mod_wsgi-2-6-and-django-1-1-1-on-centos-5-3-cpanel/' rel='bookmark' title='Permanent Link: Setup Python 2.6.4, mod_wsgi 2.6, and Django 1.1.1 on CentOS 5.3 (cPanel)'>Setup Python 2.6.4, mod_wsgi 2.6, and Django 1.1.1 on CentOS 5.3 (cPanel)</a></li>
<li><a href='http://blog.perplexedlabs.com/2010/02/08/deployment-using-capistrano-and-webistrano-via-rails-and-phusion-passenger/' rel='bookmark' title='Permanent Link: Deployment Using Capistrano / Webistrano via Rails / Phusion Passenger'>Deployment Using Capistrano / Webistrano via Rails / Phusion Passenger</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.perplexedlabs.com/2008/02/04/building-a-rails-capable-slice-from-scratch/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

