Installing Passenger without gcc
I ran into a minor issue today while trying to install Phusion Passenger on a web server I’m setting up; I don’t install development tools on my web servers. I have a whole mess of reasons for why I do this, the primary being that it makes keeping several different servers (ie, production and development) in sync a lot easier.
The problem with Passenger is that the gem assumes you have g++ installed so it can build the apache extension. Fortunately, for me, I keep a separate server that is identically configured, except it has build tools installed. My solution was to install passenger on that box, configure it, and then copy the directory over to my production box.
Short version:
gem install passenger
passenger-install-apache2-module
cd /usr && tar -zvcf ~/passenger-2.0.2.tgz `find ./ -name “*passenger*” -print`
Now just copy ~/passenger-2.0.2.tgz over to the production box and untar it into /usr. Normal Passenger setup applies from this point forward.
