Rails mongrel cluster with apache 2.2 and mysql on Ubuntu Edgy (6.10)

Posted by Michael Wed, 14 Mar 2007 17:22:00 GMT

We’ve been doing a bunch of server setups for folks in VPS’s. I figure we’d save you the cost of hiring us by posting a quick rundown on an Ubuntu Edgy Rails setup:

sudo bash
apt-get update && apt-get upgrade
apt-get remove apache2
apt-get install libssl-dev
apt-get install zlib1g-dev
dpkg --purge apache apache2
apt-get install build-essential
apt-get install libreadline5-dev
cd /usr/local/src/
wget http://apache.mirror99.com/httpd/httpd-2.2.4.tar.gz

tar -xzvf httpd-2.2.4.tar.gz
cd httpd-2.2.4
./configure --enable-proxy --enable-proxy-balancer\
--enable-proxy-http --enable-rewrite --enable-cache\
--enable-headers --enable-ssl --enable-so
make && make install
/usr/local/apache2/bin/apachectl start

apt-get install mysql-server
/etc/init.d/mysql start

cd /usr/local/src/

wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.6.tar.gz
wget http://rubyforge.org/frs/download.php/17189/rubygems-0.9.2.zip
apt-get install unzip
unzip rubygems-0.9.2.zip
tar -xzvf ruby-1.8.6.tar.gz
cd ruby-1.8.6
./configure && make && make install

cd ../rubygems-0.9.2

ruby setup.rb

gem update
gem install rails --include-dependencies

apt-get install libmysqlclient15-dev
gem install mysql --include-dependencies
gem install mongrel --include-dependencies
gem install mongrel_cluster --include-dependencies

Then you need some optional housecleaning and deploy your app. We’ll assume you know this part. If not, you can flame me via email and I’ll help you.

  • set a mysql password and add appropiate users and permissions
  • setup iptables
  • add apache conf for mongrel cluster
  • add app required gems as needed
  • use capistrano set up your directories
  • migrate database
  • start clusters
  • apache and mysql to startupscripts
  • add mongrel to startup scripts

Posted in , , , ,  | no comments | no trackbacks

Comments

Trackbacks

Use the following link to trackback from your own site:
http://weblog.imapenguin.com/trackbacks?article_id=rails-mongrel-cluster-with-apache-2-2-and-mysql-on-ubuntu-edgy-6-10&day=14&month=03&year=2007

Comments are disabled