Survival guide to LAMP: Basic ingredients

Recovered from the Wayback Machine.

I’ve heard from several people interested in moving to an open source weblogging tool like WordPress or Textpattern, but they’re concerned about having to manipulate PHP code in order to modify the templates or make the changes to the tool to incorporate modifications some of us have created.

What happens, then, is these folks stay with a hosted and/or proprietary tool, even if they aren’t happy with it, and this bothers me. I’m cool with folks remaining with other tools because they’re not interested in tweaking an open source product, or because they like the tools; but I think those of us who support the open source effort have an obligation to make the products of open source obtainable to everyone interested, tech or not. I have never felt that there should be a division between the techies and the non-techies when it comes to our physical environments. A better divider, to me, is interest: there are those who are interested in using open source products, or tweaking the product to fit their needs; and those who just want to use a weblogging tool, as is, no mods. Packaged product, end of story. Regardless of technical skill.

I’ll get into this further, but first a little digression:

Today’s Web environments are different from the environments we endured back in the Web stone age. Years ago I remember that the only thing you could depend on within a web environment was that a web server was installed. There might, just might, be other software installed that you could use–usually Perl for CGI applications. If you hosted with a Windows ISP, you also had access to ASP, and sometimes even SQL Server. If you were hosted on Unix, you had Perl and some limited ability to install a rather intimidating array of programs that usually caused havoc with your system at one time or another.

If you had your own server–and this wasn’t that common long ago–you had to maintain everything yourself, and you had to know what you were doing. Even today, with the increased sophistications of hosting options and environments, an independent environment does require a great deal of expertise with Internet and usually Linux facilities. Still, long ago, this was the only option for people who wanted to run a database, applications, and various languages.

Today the web hosting environments are different. First the reduced costs for co-location or virtual servers has increased the number of people running independent servers. However, most of us have a hosted site on an ISP, like my own on Hosting Matters, where the cost is less and, more importantly, much of the server administration is handled by the ISP. Considering the number of security releases for even a reliable product such as Red Hat Linux, having that aspect of administration handled by the ISP is worth the loss of some independence.

However, just because we don’t have total server independence doesn’t mean we don’t have access to a great deal of software. Most of us are served through the Apache web sever, with several modules compiled in increasing our ability to customize our own environment. In addition, most ISPs now offer database access, usually MySQL but other databases are supported. As for code — I don’t know of any ISP that doesn’t have PHP and Python installed in addition to Perl, and with today’s beta release of Mono for Linux, we should soon see support for C#, too. Personally, I’m looking forwared to this one–I’ve always liked C#.

We also have access to applications that help us manage our environment. My own ISP provides cPanel, a very sophisticated interface that allows us to easily add and remove users, databases, files, security, and even applications. Integrated with this control panel is a host of other tools such as PHPMyAdmin, which greatly increases the simplicity of working with the MySQL database.

There are some limitations, of course. For instance, if you want to run a beta release of a product, you might have to negotiate with the ISP to have it installed, and if it proves a problem, they’ll yank it. And forget asking to install an EJB (Enterprise Java Bean) framework on most systems. Frameworks tend to be notorious CPU hogs, not to mention tempermental and easily crashed.

However, for the most part, this shared hosting environment, with the administrative tasks handled by the ISP but with access to a plethora of tools for us to do dama.., urh, interesting stuff is an optimum solution for most of us, and is how many of us are currently hosted. At a minimum, these hosts provide what most of us ask for, which is LAMP.

O’Reilly long ago coined the term LAMP to encapsulate the web environments used, incidentally, for most weblogging tools, and hosted by most ISPs. LAMP stands for a set of open source product encompassing Linux (or one of the BSD Unix variants) as operating system; Apache as web server; MySQL as database; and one or more of PHP/Perl/Python as scripting language.

I am inordinately fond of LAMP, though most of my development expertise in the past has been non-LAMP. For instance, I’ve developed with Visual Basic/C++, within ASP and not; I’ve also worked with Delphi and Powerbuilder, in addition to spending a number of years working with C, C++, and Java on Unix boxes. There was some Perl here and there, but for the most part, much of my experience has been Windows development or Java and the aforementioned EJBs.

However, over time I’ve come to appreciate the cleanliness of LAMP–the simplicity of the development process; how lightweight and accessible it is. There is no initial investment of thousands to install the infrastructure, as is necessary (usually) with EJBs; there isn’t even a significant learning burden put on the developer to obtain expertise in LAMP. After all, anyone can install Linux on their PCs, and once that’s installed, download and install Apache, MySQL, and PHP–for free.

Okay, okay–free as in beer.

Bluntly, aside from my interest in Mono, I have no interest in returning to work with Java or huge infrastructure environments. Give me simple. Give me clean. Give me open source, and make it free.

What does this mean to you, the innocent weblog writer? Well, nothing much if you’re using a tool such as Blogger that manages your weblog for you. However, if you have to install your weblogging tool, you and your environment are going to, at some point, have to meet and greet. I know enough about weblogging tools to know that most are LAMP-based (okay, okay, .NET folks, don’t crawl all over my case with this one–I know you’re out there, in numbers to big to ignore).

How far you take the greeting, though, is up to you. That’s where we go back to webloggers who are interested in open source and tweaking, as compared to webloggers who just want to push a button and have a weblog instantly created. For most folks, LAMP exists but they don’t have the training to take advantage of it. This, then, makes installing something like WordPress, with its PHP exposure, intimidating. But there’s nothing about these tools that require a person have a technical background in order to be comfortable with installing products like WordPress or Textpattern, running updates on MySQL, or modifying an .htaccess file in order to redirect web pages.

I haven’t done a tech series for a long time, and I think I’m overdue. So, for the next few weeks, I’m going to write a number of tutorials about LAMP, targeted for the non-tech, to see if I can’t increase the comfort level with those of you using Linux, or Apache, or PHP, or MySQL. I will be focusing on PHP, of the three P’s: PHP, Perl, and Python. Personal preference you might say.

During these, I’ll install and configure WordPress 1.2 beta for one of my web sites, and then walk through modifications I’ll make with the basic product to fit my needs. In addition, I’ll also install Textpattern and do the same.

(Previously I had thought that Textpattern was proprietary, only to find out it is open source, and so to make amends, I’ll work with both products. )

Even if you aren’t interested in WordPress or Textpattern, if your site is hosted on Linux, you’ll benefit from the tutorials covering the simple line commands, not to mention SSH access. If your weblog tool uses MySQL, or you’re just interested in it, you’ll also benefit from the essays discussing this popular database. Same with PHP and Apache.

All entries in the Survivor Guide to LAMP are designated with the lava lamp icon (I thought this was apropos), and are featured in a separate category for easier access. If you have anything specific you’d like covered, drop me a note or put in a comment.

Oh, and these tutorials are also open–I’ll be attaching a Creative Commons license to these essays (but only these essays, specific to the posting only, if I can figure out how to do this). Hopefully these tutorials will be incorporated into WordPress’s documentation wiki, and elsewhere, to continue being useful long after I’m gone.

Print Friendly, PDF & Email