Passenger on Solaris

| No Comments

So today I set about installing passenger on a Solaris 10 machine. This turned out to be way harder than it seemed.

I went down the "install via gem" road, so it wasn't too painful to being with. When I reached the phase of actually installing passenger to apache, I discovered that the configuration tool is a bit confused by Solaris, especially the apache APU component.

Here's the problem:

* GNU C++ compiler... found at /opt/csw/gcc4/bin/g++
* Ruby development headers... found
* OpenSSL support for Ruby... found
* RubyGems... found
* Rake... found at /opt/csw/bin/rake
* rack... found
* Apache 2... found at /opt/csw/apache/bin/httpd
* Apache 2 development headers... found at /opt/csw/apache/bin/apxs
* Apache Portable Runtime (APR) development headers... not found
* Apache Portable Runtime Utility (APU) development headers... not found

No big deal - we'll just pass it some options, right? Wrong. The CLI only accepts arguments for apxs2 and apr, but not apu.

Running with --apr-config-path /opt/csw/apache2/bin gets us slightly further:


* GNU C++ compiler... found at /opt/csw/gcc4/bin/g++
* Ruby development headers... found
* OpenSSL support for Ruby... found
* RubyGems... found
* Rake... found at /opt/csw/bin/rake
* rack... found
* Apache 2... found at /opt/csw/apache/bin/httpd
* Apache 2 development headers... found at /opt/csw/apache/bin/apxs
* Apache Portable Runtime (APR) development headers... found at /opt/csw/apache2/bin/
* Apache Portable Runtime Utility (APU) development headers... not found

Finally the APU. This is a bit tricky to track down.

This was my process:

passenger-install-apache2-module secretly runs this file:

/opt/csw/lib/ruby/gems/1.8/gems/passenger-2.2.9/bin/passenger-install-apache2-module

Right away we see the following lines:

37 require 'phusion_passenger/dependencies'
52 Dependencies::Apache2,
53 Dependencies::Apache2_DevHeaders

So we follow them:

lib/phusion_passenger/dependencies.rb reveals that it secrely calls PlatformInfo to look for the APU:

304 if PlatformInfo.apu_config.nil?

So we jump into lib/phusion_passenger/platform_info.rb and discover (with some casual grepping):

284 if env_defined?('APU_CONFIG')
285 return ENV['APU_CONFIG']

This means that if we do the following, we can convince the installer that we do, in fact, have the necessary files:

setenv APU_CONFIG /opt/csw/apache2/bin/apu-1-config
passenger-install-apache2-module --apr-config-path /opt/csw/apache2/bin/

Hopefully this will make your life easier.

Leave a comment

About this Entry

This page contains a single entry by Jeff Kerzner published on November 29, 2010 6:15 PM.

Drupal GCal Events module and time zones was the previous entry in this blog.

Debian/Shorewall routing issues is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.