Passenger(mod_rails for Apache)のインストール
5 月 30th, 2008FedoraCore6へのPassengerインストール
$ sudo yum install gcc-c++ httpd-devel Loading "fastestmirror" plugin Loading mirror speeds from cached hostfile * fedora: ftp.jaist.ac.jp * updates: ftp.jaist.ac.jp Setting up Install Process Parsing package install arguments Resolving Dependencies --> Running transaction check ....
$ sudo gem install fastthread Select which gem to install for your platform (i386-linux) 1. fastthread 1.0.1 (i386-mswin32) 2. fastthread 1.0.1 (ruby) 3. fastthread 1.0.1 (mswin32) 4. fastthread 1.0 (ruby) 5. fastthread 1.0 (mswin32) 6. Skip this gem 7. Cancel installation > 2 ....
$ sudo gem install passenger Bulk updating Gem source index for: http://gems.rubyforge.org Building native extensions. This could take a while... Successfully installed passenger-1.0.5 Installing ri documentation for passenger-1.0.5... Installing RDoc documentation for passenger-1.0.5...
$ sudo passenger-install-apache2-module Welcome to the Passenger Apache 2 module installer, v1.0.5. 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. 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/httpd * Apache 2 development headers... found at /usr/sbin/apxs * Apache Portable Runtime (APR) development headers... found at /usr/bin/apr-1-config * fastthread... found -------------------------------------------- -------------------------------------------- Compiling and installing Apache 2 module... .... 中略 .... -------------------------------------------- The Apache 2 module was successfully installed. Please edit your Apache configuration file, and add these lines: LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-1.0.5/ext/apache2/mod_passenger.so RailsSpawnServer /usr/lib/ruby/gems/1.8/gems/passenger-1.0.5/bin/passenger-spawn-server RailsRuby /usr/bin/ruby After you restart Apache, you are ready to deploy any number of Ruby on Rails applications on Apache, without any further Ruby on Rails-specific configuration! Press ENTER to continue. -------------------------------------------- Deploying a Ruby on Rails application: an example Suppose you have a Ruby on Rails application in /somewhere. Add a virtual host to your Apache configuration file, and set its DocumentRoot to /somewhere/public, like this: ServerName www.yourhost.com DocumentRoot /somewhere/public And that's it! You may also want to check the Users Guide for security and optimization tips and other useful information: /usr/lib/ruby/gems/1.8/gems/passenger-1.0.5/doc/Users guide.html Enjoy Passenger, a product of Phusion (www.phusion.nl)http://www.modrails.com/ $ sudo vim /etc/httpd/conf/httpd.conf $ sudo /usr/sbin/apachectl configtest Syntax OK $ sudo /etc/init.d/httpd reload httpd を再読み込み中: [ OK ]