Skip navigation

Resumen

Descargar e Instalar WebMin

http://prdownloads.sourceforge.net/webadmin/webmin-1.380-1.noarch.rpm

# rpm -ivh webmin-1.380.1.noarch.rpm

Instalar Ruby, Rails, Mongrel

http://wiki.rubyonrails.org/rails/pages/RailsOnCentos5_mongrel

cd ~/

sudo yum -y install ruby ruby-devel mysql-devel gcc

wget http://rubyforge.rubyuser.de/rubygems/rubygems-0.9.4.tgz

tar xzf rubygems-0.9.4.tgz

cd rubygems-0.9.4

sudo ruby setup.rb

sudo gem update --system

sudo gem update

sudo gem install rails --include-dependencies

sudo gem install mongrel_cluster -y

sudo /usr/sbin/adduser -r mongrel

sudo mkdir /etc/mongrel_cluster

sudo cp /usr/lib/ruby/gems/1.8/gems/mongrel_cluster-1.0.5/resources/mongrel_cluster /etc/init.d/

sudo chmod +x /etc/init.d/mongrel_cluster

sudo /etc/init.d/mongrel_cluster start && sudo /sbin/chkconfig mongrel_cluster on

sudo mkdir /var/www/apps

sudo mkdir /var/www/apps/testapp

sudo chown -R mongrel.mongrel /var/www/apps/testapp/current/log

sudo chown -R mongrel.mongrel /var/www/apps/testapp/current/tmp

Instalar Cluster Mongrel bajo Apache Proxy

http://bliki.rimuhosting.com/space/knowledgebase/linux/miscapplications/ruby+on+rails

mongrel_rails cluster::configure -e production -p 8000 -N 3 -c /var/www/apps/testapp/current --user mongrel --group mongrel --prefix=/test

<VirtualHost *:80>

  ServerName dummy-host.example.com

  # Presuming your rails app is at /var/www/test

  DocumentRoot /var/www/test/public

  <Directory "/var/www/test/public">

        Options FollowSymLinks

        AllowOverride None

        Order allow,deny

        Allow from all

  </Directory>

# Configure mongrel_cluster <Proxy balancer://mongrel_cluster> BalancerMember >>http://127.0.0.1:8000 BalancerMember >>http://127.0.0.1:8001 </Proxy>

ProxyPass / balancer://mongrel_cluster/ ProxyPassReverse / balancer://mongrel_cluster/

# These directories should always be served up by Apache, since they contain static content. Or just let rails do it. ProxyPass /images ! ProxyPass /stylesheets ! ProxyPass /javascripts ! ProxyPass /favicon.ico !

RewriteEngine On

# Important rule to prevent exposure of subversion files if you are deploying with Capistrano ! RewriteRule ^(.*/)?.svn/ - [F,L]

# Rewrite index to check for static RewriteRule ^/$ /index.html [QSA]

# Rewrite to check for Rails cached page RewriteRule ^([^.]+)$ $1.html [QSA]

# Redirect all non-static requests to cluster RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L] </VirtualHost>

Anuncios

Responder

Por favor, inicia sesión con uno de estos métodos para publicar tu comentario:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s

A %d blogueros les gusta esto: