How To Build a LAMP Server
Volume One: Install and Configure the Software Stack
© 2013 Steve Parker, BSc, RHCE
This book is about setting up a LAMP (Linux, Apache, MySQL, PHP) web server. It covers all of the necessary tasks, and explains all of the important aspects of each part of the stack along the way.
This first part, Volume One, can be used as a direct guide for installing the software, but it aims to also help the reader to understand the nuances of the software being installed, with helpful advice about the structure and setup of the system, and about ensuring maintainability as well as securing the overall system.
LAMP is actually a coming together of four entirely unrelated software projects, which share a similar ecosystem and development culture, and which work together particularly well. Each part is Free or Open Source software, developed in the open and actively updated independently of the others. The interfaces between the elements are well defined however, so they continue to work well together in spite of there being no centralized control whatsoever. This also means that any of the elements can be replaced by equivalents - most often the "P", which can be PHP, Perl or Python, and the "L", which can be Linux, Windows (WAMP), Solaris (SAMP), one of the BSD-based Unices (such as OAMP for OpenBSD), or even Mac OSX (MAMP). The Database and Web Server layer can be replaced too, though this is less often seen.
Whilst not a PHP or MySQL tutorial, Volume Two also shows how to structure and set up a simple database and write the PHP code to manipulate that database. The resulting code as well as configuration files are also available for download for free from this link.