Tuesday, 10 July 2012

How-to: Build a Wordpress Server Part One - LAMP


Burning Oil Lamp  Creative Commons  courtesy photos-public-domain.comI know there have been series and one-off articles on creating servers all over and in Full Circle Magazine in the past, but at risk of repeating things to the old hands, we're going to run through some of that again to a specific purpose; namely, building my a Wordpress server. You can build using a virtual machine or on physical hardware, the steps are the same.

Wordpress is a web-site content management system (CMS), in the same class as Drupal, Joomla and the like. It's available in two versions: hosted, where everything is done for you and self-hosted, which is do-it-yourself. We're going to do it ourselves...

Over on Wordpress.com, the lovely Wordpress people will host as many instances of the CMS as you can maintain for free -as long you can live with their ads appearing alongside your content and can work within the restrictions of the free templates provided (paid upgrades are available). Wordpress.com takes care of the hosting platform including, availability, storage, security upgrades.

Or you may prefer to go the independent route and host your own instances of Wordpress – the code is free and relatively Open Source - perhaps you fancy getting into Wordpress development, in which case you need a server environment on which to build and test sites. Fortunately there is an easy way to get started if you install onto your own server the freely available Wordpress software from Wordpress.org. In our Linux world, you need a machine running the LAMP stack to supply that server facility.

Tasksel secreen in the Ubuntu Server InstallerLAMP stands for Linux, Apache, Mysql, and PhP, the core components that make up a server; the operating system, the web-server layer that manages the communications between host and clients, a database and management tools for the content running an open source version of a Structured Query Language database, plus an application layer to present and manipulate your content.

I'm going to assume this is a local server sitting under the desk; the set-up of a remotely hosted server can look a little different.

Begin by downloading the appropriate server image from the Ubuntu site. I'm still using the 11.10 release, but you can go straight to 12.04. During the installation process, the Ubuntu Server installer will ask you to choose the type of server you want to create, listing the options available.

This is the selection screen from the package tasksel, which makes easy work of creating the various server types listed without you needing to know what all the necessary meta-packages are. You could install tasksel onto any Ubuntu machine and use it to upgrade it into any of those server types. Navigate with up and down arrow keys and select with the spacebar (no mouse-work on this text-based screen).

Select the LAMP stack, and, as it will be useful to log in using OpenSSH, select that meta-package as well to download and install the Apache, MySQL, PHP, and the OpenSSH packages.

It's a short and painless process, just be alert for the prompts to set users and passwords. You will need to create an admin user for the server and an administrator user/password for the Mysql database management system. I'd suggest making them different user names and passwords for basic system security.

You should also be greeted by a login prompt. Log in using the root user name and password you chose when you installed Ubuntu.

Testing the Apache server - It Works!If all went well for the install, your server stack should be up with the appropriate services running for a working Linux web server. Assuming the machine is attached to your local network, you can test your new server by opening a web browser and heading over to http://localhost:8888. If you see a page that exclaims “It works!”, then the server - well... works.

That's our foundation in place. In Part Two, we'll move on to setting up Wordpress itself. RC

Image credits: Burning Oil Lamp Creative Commons courtesy photos-public-domain.com