LAMP (acr., n.) Linux, Apache, MySQL, PHP
A complete Webserver running Apache HTTPD server, with PHP Hypertext Preprocessor and MySQL Database server, running on a Linux Serverbase.
It is a wonderful thing, and the backbone of the internet. Without webservers the Internet as we know it could not exist. These are the remote computers that store our websites and serve them out to whomever may ask for them. With the advent of the Open Source Revolution a webserver became a thing that anyone with the know-how and desire could setup his-or-herself without much in the way of monetary outlay. I, being the networking geek I am, have recently done this myself, as have many other people like me. This post isn’t going to be a tutorial on compiling your own webserver, although one of them may be forthcoming down the track, if I feel like it. I, instead, ran into some problems whilst making my server, and in all my hours of Googling I didn’t find anyone else who’d had this problem. Thus, this post:
This isn’t so much about Apache HTTPD, which compiled the first time perfectly for me. It’s more about MySQL and PHP, which didn’t. I couldn’t even get them to the ‘make’ stage, for it turned out that I had a problem with some packages installed on my Fedora Core 4 server. Problem being: they weren’t installed. Shock horror! Agog and aghast! Yada, yada… anyway. In order to compile properly both PHP version 5 and MySQL 4.1 require the GNU gcc-c++ compiler modules. Installing these is fairly simple, considering that FC4 comes with yum preinstalled and configured for you. Simply do this:
<root@myserver># yum install gcc-c++
Simple, no?
No.
See, gcc-c++ has a package dependancy that yum will not, no matter how much you try, be able to resolve. It requires libstdc++-4.0.1-4.fc4. That’s the long and the short of it. yum cannot install this. Why, may you ask? If you do:
<root@myserver># sudo yum list libstdc++*
There it is in that lovely list. Yet yum claims to not be able to install it. If, then, you do:
<root@myserver># rpm -qa | grep libstdc++
You will find in that list, libstdc++ already installed by default. So what’s the problem here? Well… gcc-c++ requires 4.0.1-4, and you have 4.0.1-8. It’s too recent. yum cannot count this as a valid dependancy resolving package, for the revision number is incorrect. Enter PBone’s RPM Finder. Searching their entire FTP archive for (and I quote) “libstdc*4.0.1-4.fc4″ will, after 4 or 5 pages of RPMs, finally turn up the correct, neeed version of libstdc++ for the i386 platform. Huzzah! In order to install this, since it’s older than your currently installed version, requires the use of an extra switch in the rpm command, in order to tell RPM that, yes, you do in fact wish to downgrade the package:
<root@myserver># rpm -Uvh --oldpackage <url of package>
Okay… once RPM retrieves and installs that package, go back and do the yum install command from earlier, and all should be fine ‘n’ dandy this time around. Happy compiling!