I have my webserver (at the time of this writing, the one on which this blog is posted) configured rather nicely, however, as with everything that accumulates over time, it’s current state is a combination of quite a lot of trial-&-error sessions that would be really hard to duplicate the first time I tried to do so on another environment. Therefore, I’m going to try to log the configuration I use to get a system working as I like. This may or may not turn into a tutorial-type series, but for now, it’s just notes for myself.
The core of my server is, of course, the Apache HTTPD web server. For dynamic pages, I almost entirely rely on the PHP programming language. For database storage, I use MySQL. Finally, rounding out the most important services I run on my server is Subversion versioning server, which I use for nearly all my code-based projects now. I also run the IceCast2 server, but since its configuration is pretty-much independent of the other four packages I’ve described, I’ll leave that out for the time being.
I strongly prefer source-based installations for the flexibility you get when it comes time to install. With the advent of a large support community around the Fedora project, it’s really become less of any issue, as nearly every package is kept up to date with the latest version. This is good & well for my development machine at home. But my current host, Servermatrix, only supports Redhat Enterprise Server releases. Therefore, to get the latest versions of these server packages, I will need to go to the sources. Plus, you get to learn a lot more when you’re getting down-&-dirty with the code – configuring, compiling, and sometimes every altering code! Oh…the excitement!
Having said that, this configuration guide is going to be dealing with the source-based installations of these packages only. So, let’s start downloading. Here are the relevant links (I have tried to link to the most specific, version-neutral download page available for each package):
I strongly suggest you make a directory named “packages” or something unambigious in which to download & extract all your files. This is the way I do it, and it’s the way I’ll be doing it throughout this guide. How you do it is your business, but I can’t possibly know for sure how you’ll be doing it ahead of time. If you have a preferred, possibly superior package directory structure, by all means, do post a comment or let me know some other way. I’m always up for doing things the better way, if & when I discover such ways. However, I’ll be referring to the packages directory throughout this guide, so now you know to what I’ll be referring.
While you’re downloading these packages, now would probably be a good time to start reading up on the documentation for each package. Some more nice links to check out (I have linked to either the most updated documentation available online or, where appropriate, to the documentation related to the specific version covered by this guide):
- MySQL documentation
- Apache HTTPD documentation
- PHP documentation
- Subversion documentation (SVN book)
It’s probably a good idea to bookmark these pages. If you’re using a browser that supports tabs (e.g., Firefox), you might consider making a folder with just these relevant links. You’ll probably appreciate it multiple times throughout this guide.
Once you’re downloads have all finished, it’s time to start extracting! I usually download the bzip2 versions of each package, if they are available, because I like the idea of things taking less space where possible. With modern CPUs, the time difference between gzip compression & bzip2 compression is almost a non-issue, whereas the space savings almost always is significant (10 – 20% minimum, usually). At a later date I will probably go into more details about how the packages are structured, but for now, I’ll just explain how to get the files out & ready to configure. The command to extract the files will look like the following:
For bzip2-compressed packages:
tar -xf package-name-version.tar.bz2 --bzip2
For gzip-compressed packages:
tar -xf package-name-version.tar.gz --gzip
This will usually extract out the files into a subdirectory like this:
~/packages/package-name-version
This will become important as we do upgrades to newer versions. As you extract the new versions to their respective directories, you generally won’t overwrite your older versions. This is very useful, as you’ll be able to go to your older versions & retrieve your old configuration settings nearly effortlessly, which will save a lot of time when it comes time configure, compile, & install a newer version of an existing package.
So, once we’re done, we should have four files in ~/packages and four directories with names similar to the packages. We’ll stop here & proceed forward with another session when I’m feeling up to it.
I almost flagged your post as spam, but then I realized you were actually saying something. ; ) Actually, I host through Servermatrix, and I still prefer dealing with source-based packaages. So, while I’m setting up the server on my home PC, the information is meant to apply to my live, production hosted server.
Why not go the whole way and use a source-based OS? Especially one named after fast arctic birds?
ducks