So last week I got my Linux server up and running 24x7 on my LAN. I've got it grabbing daily snapshots of my website databases. It's running Apache 2.0, SSH, FTP and Samba successfully. From my main Windows PC, my home directory on the Linux box is my H: drive. So far very cool, and not that difficult for someone who doesn't regularly use Linux.

My next step was to install some Version Control software because I wanted to use this Linux server as a repository for all my documents, source code, databases, etc. I decided on Subversion since I had never used CVS and apparently Subversion is meant to fix some annoyances in CVS...I read through the first couple chapters in the free O'Reilly Subversion book and most of the Administration chapter...OK, another something I can put on my resume, I guess - let's do it.

The problem is that to install Subversion on a server so that I can access it through a web page (one thing I feel is a necessity), I need to have Apache compiled with the mod_dav module. The Apache that comes installed with Mandrake does not have this module compiled in.

Ok, download the Apache source (of course always run md5sum on your tarballs to make sure everything is cool before going any further) and then run "configure". Woops, it tells me I need "autoconf". Ok, download GNU autoconf and run "configure". Woops, it tells me I need "m4". Ok, download GNU m4 and type "configure". Finally the list of dependencies has stopped at a Unix macro processor. Amazing.

Well, I successfully installed m4 (configure, make, make check, make install, thank you very much) and then successfully built autoconf (though the "make check" took a LOOONG time). The pain of having to install all these packages is only slightly offset by the joy of actually successfully building and installing them. Too little payback to make this worth it so far...

Then I decided that when I compile Apache I might as well install all the modules I might need, so I tried to configure Apache with mod_deflate, mod_ssl, among others. After 5 minutes of running, the configure script gave me an error saying zlib not present and that mod_deflate was missing dependencies. Ok, go download zlib source, configure, make, make install, done. Back to the Apache configure script: After 5 minutes of running, the configure script gave me an error saying OpenSLL headers not present. Ok, go download OpenSSL source, configure, make, make install, done.

By this time I had become bold enough that I figured I can solve any problem I find thanks to the support of the internet, so I removed all the Apache modules that come installed with Mandrake (using rpmdrake) and then went back to building Apache. That's a funny thing about Linux, the more you have to tweak and build and install packages, the more brave (or foolish) you become.

Well, I was able to finally get Apache built, installed and setup as a "service" or daemon on my machine that starts automatically (thanks to this page). Beautiful! However, when I tried to open index.php on my local box guess what happened.

That's right, PHP doesn't come with Apache, you have to build mod_php and set it up separately. Well what good is a web server without PHP? I started at this nice page. Ok, go over to the PHP Website and download the latest source. Cross your fingers and type "./configure". BAM! flex/lex not found. Ok, go download flex: configure, make - BAM! yacc not found. This is comical enough that I continue because I know it must end eventually: Download Bison (a yacc replacement): configure, make, make check (if you insist), make install. Now fall back to flex and rebuild: configure, make, make install. Everything looks good, now why was I installing flex again?

Oh yeah, PHP...(sheesh!). Ok, back to PHP and configure, make, make install - BAM! "DBA: Could not find necessary header file(s)". WTF? Ok, that page I started at for PHP installation mentions this error is a result of the gbdm-dev rpm package, this page seems to have a version of this rpm for Mandrake 10.1, let's give it a go. Install that and libgdbm from my Mandrake disks and it looks like PHP now will configure, make and make install. Now finish things up with the PHP (edit some configuration files), restart my web server and ...

Beauty! My apache server now supports DAV, SSL and PHP.


Now to return to how this all started: Subversion. I've configured it without any issues and built it successfully. I'm now checking it so we'll see how it looks in the morning. After I install it, I'll set up a repository and then work on getting Apache and SV talking so that I can access things via the web...more on that in future entries if it proves interesting...

Now to comment on my above ordeal, I realize that the Linux crowd love it this way and that Linux is not for the point-and-click, newbie-type crowd and maybe it's some initiation rite or test of manhood (oh wait, that one involves rebuilding the kernel, doesn't it?), but I had a thought: If all the GNU projects out there can commonize on the configure, make, make install scheme, why can't they also come together and figure out a way to automate alot of these dependencies? In some sense that's what the big distros like RedHat, Mandrake do and I know the rpms out there are a big step in that direction, but I'm talking about at the individual project source code level (because let's face it, everyone likes to have the bleeding edge code). If a couple heavy hitter projects like Apache, Subversion, CVS and GCC come together and figure it out then most others would begin to follow suit.

For example, if my configure script tells me I need zlib, then ask me: Do you want me to install the latest zlib for you? Then go wget it from the internet! Your software has that dependency, it should be responsible enough to offer to go grab it. Or, at the very least, the configure script should do as much checking as it possibly can before dying its death. Don't kick me out with an error and leave me to uncover my dependencies one by one. Another thing I'd like: Some indication of progress on these configure, make and make installs.

See, I don't have a lot of time to sit in front of a Linux box and creep through these install scripts. I have a wife and two babies and going through the above ordeal took me several days of pecking away at it late at night through the VNC client or whenever I could sneak downstairs for an hour. I'm sure a lot of you out there are saying "Then why the heck are you bothering with Linux at all then", but I think everyone should have access to a stable operating system, not just those who have nothing better to do.

I realize this post makes me look like the Linux newbie that I am, but I just had to document the ordeal...it may be due to the fact that I just didn't install the right distribution or the right install "suite" for Mandrake...I mean how can something calling itself "Linux" not have lex, yacc, m4 by default?

§37 · February 11, 2005 · Software, Technology · · [Print]

4 Comments to “A Patchy Here, A Patchy There”

  1. Rob says:

    The good news is that you won’t need to download them again to build with your current set up. The bad news is that next time you want to build a linux box you’ll need to do the exact same thing.

  2. Dominic says:

    You’ve probably figured this out by now, but the problems you were having are a result of using Mandrake. Mandrake assumes that you’ll be able to get everything you could possibly want from their RPMs, so it doesn’t include any of the headers or tools to compile standard everyday bits of software like apache and PHP. I also had all this trouble, and got all the way up to the bison dependency for PHP before I decided Mandrake just wasn’t for me.

    I’m normally someone who’s pretty confused by Linux in general, and here was a distro that was actually too dumbed down for me! Craziness.

  3. Jeff says:

    Yep, it did dawn on me that Mandrake (now Mandriva) was not a “developer’s Linux” to say the least. I guess they’re going after the Windows market… The beautiful part is that you CAN get Mandrake configured the way you like for free, so now I’ve that I’ve got my machine loaded with all the extras (bison, yacc, etc) that it works just fine for me.

  4. Ryan says:

    Argh! I am about to go out and kill some penguins! Why would anyone think that *not* offering standard compilers is a good idea? I do not have any Linux experience except to know that from a server standpoint, it is a d@mn sight better than Windows. However, I have never wasted so much time as I have trying to configure the unconfigurable. Yes, I am running Mandrake 10.4. Yes, I wish to God it was any other OS in the world (my old Commodore 64 is looking better and better). No, I cannot change it.

    So…

    Please please please: In basic, simple, easy to understand terms (like “Copy this and paste it here and you should see…”) can someone please tell me how to get Yacc, Flex, and all the rest to get a LAMP server going?