Ruby on Rails bekommt jetzt einen Indianer.
Vorbei sind die Zeiten von Mongrel und Apache nebeneinander
1. gem install passenger
2. passenger-install-apache2-module
Aber alles nach der Reihe. Also zunächst lade ich mir das gem Paket von passenger herunter. Keine Sorge, der Installer überprüft alle Abhängigkeiten und gibt den nicht Linux Admin auch hinweise auf noch zu installierende Pakete.
gem install passenger
Der Installer meldet sich dann mit dem dialoggeführten Menue.
Welcome to the Passenger Apache 2 module installer.
This installer will guide you through the entire installation process. It
shouldn’t take more than 3 minutes in total.Here’s what you can expect from the installation process:
1. The Apache 2 module will be installed for you.
2. You’ll learn how to configure Apache.
3. You’ll learn how to deploy a Ruby on Rails application.Don’t worry if anything goes wrong. This installer will advise you on how to
solve any problems.Press Enter to continue, or Ctrl-C to abort.
Da ich die Installation und nur die Installation haben will, wähle ich den Menüpunkt EINS.
1
Danach werden die bereits erwähnten Abhängigkeiten geprüft.
Checking for required software…
* GNU C++ compiler… found at /usr/bin/g++
* Ruby development headers… found
* OpenSSL support for Ruby… found
* RubyGems… found
* Rake… found at /usr/bin/rake
* Apache 2… found at /usr/sbin/apache2
* Apache 2 development headers… not found
* Apache Portable Runtime (APR) development headers… not found
* fastthread… foundSome required software is not installed.
But don’t worry, this installer will tell you how to install them.Press Enter to continue, or Ctrl-C to abort.
——————————————–
Installation instructions for required software* To install Apache 2 development headers:
Please run apt-get install apache2-prefork-dev as root.* To install Apache Portable Runtime (APR) development headers:
Please run apt-get install libapr1-dev as root.
Die vom Installer vorgeschlagenen Pakte unter Debian mit ( apt-get install apache2-prefork-dev) nachinstalliert, danach müssen wir die Zeilen für die Passenger_module in der apache2.conf anpassen. Das wird aber vom Installer ebenfalls noch angeraten.
Include /etc/apache2/sites-enabled/
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-1.0.1/ext/apache2/mod_passenger.so
RailsSpawnServer /usr/lib/ruby/gems/1.8/gems/passenger-1.0.1/bin/passenger-spawn-server
RailsRuby /usr/bin/ruby1.8
Naja vielleicht sollte man seine Virtualhosts noch dem entsprechend anpassen. Auf einem Debian System finden Sie diese unter /etc/apache2/site-enabled/default (haben wir über die Include Anweisung in der apache2.conf festgelegt.
<VirtualHost *:80>
DocumentRoot “/var/www/example.net/public”
ServerName “www.example.net”
ErrorLog “/var/www/example.net/log/error.log”
CustomLog “/var/www/example.net/log/access.log” combined
<Directory />
Order allow,deny
RedirectMatch ^/*news/$ /news/
Allow from all
</Directory></VirtualHost>
Damit sollte der Apache2 mit Mod_rails und Passenger einsatzbereit sein und sich auf neue Besucher freuen.
Leider gibt es bisher keine Benchmark tests zu passenger im vergleich zu Mongrel oder den anderen App-Server. Da das ModRails Projekt ist unter der Seite ModRails.com zu finden es gibt auch einen guten Railscast zum Thema Mod_Rails.
Fazit: ……
Hat Dir der Artikel gefallen, dann Abonniere den RSS FEED
Tweet This
Twitter |
Stumble this or
Delicious this
