Installing Phusion Passenger on Centos5
in
I am currently consulting on a project that requires Phusion Passenger to be installed on a Centos5 install. As a proof of concept I setup everything on a vmware instance and ran through the process. Instead of describing everything line by line I create a bash script that performs pretty much everything. Below is a paste.
The code parser in Drupal tries to be smart by inserting HREF's for http strings. Make sure to remove them!
# Installing Ruby and Phusion Passenger on Centos5 # # Dependencies # httpd # mysqld # su as root su # Install deps required to build passenger yum install httpd-devel yum install gcc-c++ #Install Ruby and required deps for building gems yum install -y ruby yum install -y ruby-devel ruby-docs ruby-ri ruby-irb ruby-rdoc # Install rubygems cd /usr/local/src wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz tar -xvzf rubygems<script type="text/javascript" src="/sites/all/modules/tinymce/tinymce/jscripts/tiny_mce/themes/advanced/langs/en.js"></script>-1.3.4.tgz cd ruby-1.3.4 ruby setup.rb # Install phusion passenger gem install rails gem install passenger # Configure passenger passenger-install-apache2-module # Create apache config file touch /etc/httpd/conf.d/phusion_passenger.conf #Append Values to apache Config echo LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.1.3/ext/apache2/mod_passenger.so >> /etc/httpd/conf.d/phusion_passenger.conf echo PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.1.3 >> /etc/httpd/conf.d/phusion_passenger.conf echo PassengerRuby /usr/bin/ruby >> /etc/httpd/conf.d/phusion_passenger.conf # Setup a virtual host with similiar config to below #<virtualhost> # ServerName www.yourhost.com # DocumentRoot /somewhere/public # <-- be sure to point to 'public'! #</virtualhost>
The only problems I encountered were with mods to iptables and SELinux. Those need to be addressed on a case by case basis. Aside from that this should be all you need to get rails up and running on either Centos5 or RHEL5.
| Attachment | Size |
|---|---|
| phusionpassenger.sh | 1.23 KB |
- Login to post comments