|
If you're here, chances are you don't need to know why it's good to install your own custom-compiled apache server. But, to be detail-oriented (some would say "anal"):
- You'll have a smaller, stabler httpd core by only compiling in the modules you need,
- You'll save memory- I dropped from around 8 meg for the default RPM httpd process to 5 meg with my custom-compiled version,
- You'll be able to modify apache- keep this Makefile and the sources handy and you'll be able to add/remove modules easily,
- You'll learn a lot about how apache, mod_perl, and PHP work,
- You'll get geek street cred.
All the attempts I made at compiling my own Apache server while bundling in my two favorite modules (mod_perl and PHP) in the past failed horribly. Like "flaming-wreck-reinstall-from-RPMS" horribly.
My problem was that I never systematically approached it- I didn't have a clear record of which parameters I had passed to what, and didn't have an easy way to "redo" my aborted attempts.
If you need a quick, easy and systematic way to manage installing Apache, mod_perl and PHP from source, then keeping a Makefile is for you. This little Makefile was passed to me by Jesse Earlbaum, the author of CGI::Application.
You'll end up with a custom compiled Apache httpd binary with DSO support. You'll have it as a record of everything you've done to install your server. You'll be able to add in and remove modules at the drop of a hat, allowing you to bend apache to your will.
I updated Jesse's system and included a partial install of PHP. See the Makefile and the README for more information.
This has been tested on Redhat 7.1, 7.2, and Mandrake 8.0. It should work fine on pretty much any GNU/Linux system, and probably *BSD too. I can't help you if you're using Windows. Let me know if you've used this on another system.
|