Building Apache 2.2 and PHP 5 with OpenSSL and Other Handy Modules and Libraries
This little project prompted the creation of this blog.
After I suggested to some folks on the nyphp “talk” list that compiling your own daemons from scratch isn’t painful so long as you maintain some scripts to do it for you, Dan Horning called my bluff.
So instead of just dumping some stuff on a server, I went all out and created a blog (since I have some other code I want to publish sooner or later, anyway).
This stuff is not a “product” of any sort. It’s just an example for anyone interested in building their own apache/php stack from source, with openSSL, and various other goodies. These scripts cand be a good starting place for building your own.
Point of Interest: These build scripts built the Apache and PHP binaries that are powering this blog.
NOTE: I have no idea what kind of damage this might do to your system. Please don’t run this stuff straight out of the box on any machine that is not ready to be rebuilt from scratch. Really, I mean it. The best thing you could do is look at what I’ve done and build your own scripts to suit your situation.
Anyway, since it’s getting late, and I want to get this stuff published before hitting the hay, you can download the scripts by themselves here:
- http://blog.electricmindcontrol.net/files/build-php5-apache22-openssl-0.1.tar.gz – 31M – the scripts, plus the source tarballs they need.
- http://blog.electricmindcontrol.net/files/build-php5-apache22-openssl-0.1-slim.tar.gz – 10K – just the scripts. You’ll need to go hunt down the various tarballs yourself. It’s fun!
If there’s interest, it might be fun to actually try to productize this a bit. My approach is pretty distro-agnostic. For instance, I compile all this stuff into /php5web, outside of the host system’s setup. I don’t really see other people doing this, but it’s kind of nice. I typically run servers with 2 or more distinct stacks (various permutations of apache 1.3.x/2.0.x/2.2.x and php4.x/5.x) listening on different IPs — which is pretty handy sometimes.
One last hint: apache is kind of dumb about openssl. You might need to add /<yourinstalldir>/openssl/lib to your /etc/ld.so.conf and then run /sbin/ldconfig if apache complains about not finding libssl.0.9.8.so or somesuch.
April 18th, 2009 at 2:26 pm
[...] compile my own AMP stack from source, so my setup is a little different than [...]