Compiling Apache on Gentoo
by HidekiAI on Nov.26, 2008, under Technology Opinions
I just recently had to re-install Apache2 on this server, fresh Gentoo install using 2005 CD (yes, I know, it’s old, I’ve been using Gentoo for a while now). I didn’t want to waste anymore CD’s to burn (actually, I’ve run out burning so many Ubuntu) for X86 based system (my server is Intel based while my dev-system is AMD x86_64, so it’s been a while since I needed x86 Gentoo CD).
In any case, this server had bare-minimum with very old kernel (incidentally, the paradox of trying to emerge latest gentoo-sources kernel requires udev to be emerged first, yet old kernels cannot be emerged with udev, was a pain in the butt – I did a –skipfirst to force it to skip udev so that I can get the sources, compile the kernel, reboot, then emerge udev again).
When you attempt to emerge apache2, you will be required to install apr and apr-util to compile Apache (same deal with log4cxx). If you go to Apache’s site and investigate on the dependecies required for apr, they specifically tell you they have done their best to be standalone and can compile as-is. This is true if you hand-compile it. I was able to compile both apr (first) and apr-util (needs apr’s source to compile) without any issues, but when you try to have emerge build it and install it for you (because I wanted it to be in my ‘world’ database), it errors otu with the following:
libtool: compile: unable to infer tagged configuration libtool: compile: specify a tag with `--tag'
I thought I had older versions of libtool, etc but no matter what I’ve updated, it will continuously complain about this configuration issue. I’ve even tried compiling the apr/apr-util by hand, let it reside in the /usr/lib path, etc but to no avail.
Finally, I’ve decided to emerge Ant since I know how big they are on using it. It pulled in about 30 dependent projects (because I did emerge –deep to make sure I had all its requirements covered) and then tried to emerge Apache2 again. Whether it was Ant that did it or some of its dependencies that was needed by ./configure was resolved for apr, and Apache2 compiled without any issues.
Although it’s more maintenance and time-consuming to figure out some of the installations for Gentoo, I still feel most comfortable with Gentoo. One of my server is Ubuntu Server, I’ve had Fedora as server once as well, but because I do most of the pre-production experiments on Gentoo first, and just be able to copy the config files over to my servers (because the paths differs from distro-to-distro) and as we all know, in some cases, you have to mess with so many config files to make things work on Linux (case in point: setting up ldap requires configurations of other services such as kerberos, etc – personally, I think this is why Microsoft is just so much better because installing services such as ActiveDirectory takes less than 30 minutes and it works!).
As mentioned, one of my servers are Ubuntu, but that server is isolated in a sense that it only has one or two purposes, thus I did not have to stress myself on securities based on bad configurations. I didn’t have to invest too much time on my dev-box to test for problems, transfer and/or mimic the configurations on that server, and if it didn’t work, come back to my dev-box, and back-and-forth.
But when you have to deal with that back-and-forth as experimenting on functionalities, it becomes critical that the distros are similar in paths structures so that you won’t have to re-edit it on the server side to accommodate on paths differences. Another argument is security holes and upgrades. If you have multiple distros, one distro may have already fixed/patched it but others may still be on hold. Say there was a security problem on sshd, you’ve updated on your dev-box (via emerge) and tried to update your Ubuntu (via apt-get and/or aptitude) and there’s no update yet, you put it on the side and forget to update it for few days leaving that server vulnerable.
By the way, in regards to path structures, the argument can be made not just for Linux servers, it can be the same for Microsoft Servers as well. I’m sure we’ve all installed applications on Microsoft O/S where on one system it is in C:\ while on another, it’s on D:\ (and yes, I know about capabilities of being able to mount another drive as a folder on Microsoft, that may solve the issue of having multiple drives but that’s not the point here, the point is that no matter what O/S it is, you can have inconsistencies if you allow it).
LinkedIn profile
Recent Comments