Building a Lamp box using debian linux

LAMP – Linux, Apache, MySql & PHP.  These software packages installed together make for an extremely powerful way of hosting websites. Various forms of Linux can be downloaded for free.  Apache is the most used web server in the world and it’s free. MySql is a powerful relational database and PHP is a powerful scripting language.  Together these programs provide everything you need to create full websites with ineractiviy.  What’s more with the power of a relational database, you can provide very data rich pages to your users.

Over the next few posts, I’m going to detail a method of setting up a fully working LAMP system.  The steps will allow you to build a new lamp system from scratch to run on either a 64-bit intel based processor, or a Raspberry PI.  Apart from the initial steps for installing the Linux OS, everything else will be pretty much the same.

I’m going to install three different systems with this setup.  The first two will be virtual machines running in VMWare (One on VMWare Player in windows, one on VMWare Fusion on Mac OSX). The third will be installed as the main OS for a Raspberry PI Model B.  As these systems are based on different hardware, I need to use two different installers.  For the virtual machines, I can use the installer for Debian linux from here, for my download I chose the “amd64” download as this is for 64-bit processors (which both my desktop and laptop have)  for the Raspberry Pi I used the Raspbian download from here, it’s worth me pointing out that this will also install Debian Wheezy on the PI.

The installers are all fairly straight forward.  For the Intel based images, you are provided with an ISO file which can be plugged directly into VMWare whilst creating the virtual machine.  For the Raspberry PI, the installation process means using another machine to format and install the image onto the SD Card, then boot the PI.

LinuxAfterFirstBoot

Either way, you will end up with the same boot loader and installation options.  For my install, I chose to install  the absolute minimum, no GUI, no tools, or anything, I wanted complete control over the setup process.

Once installed I will be manually installing Apache, PHP, MySQL and an FTP server. This will give me the ability to use the linux machine in the same way that I would use for web hosting.  If I wanted, instead of the FTP, I could use SAMBA to create windows file shares which might work well as an alternative to FTP.  That is a decision that I can make later.  If I desired there is nothing stopping me from having both FTP and SAMBA.

The observant will notice that I after install I executed the APT-GET UPDATE command. This makes sure that my Linux install is completely patched.  I believe that patching is always the better option, it helps with issues like the recent Heartbleed scare.

Next post installing MySql

Leave a Reply

Your email address will not be published. Required fields are marked *