LAMP 2017

Building LAMP Server

This is an updated version of my guide to building your own LAMP server for development purposes. What will make this guide different from the previous ones (in addition to using newer versions of the various software), is that I will be providing steps for different Linux distros as well as installing additional packages I didn’t include in the previous two guides.

Estimated time (for entire guide): 45 minutes
* differs greatly depending on how much you want/need to install

Articles In This Series

I’ve broken each step into a separate article for brevity. You can skip those articles that don’t apply to you.

  1. Introduction — this article
  2. Setup Virtual Machine
  3. Install Linux
  4. Apache HTTP Server

Software Used

  • VirtualBox — a free open-source hypervisor we will use to install our server as a virtual machine. You could use another hypervisor or a physical machine if you prefer; I chose VirtualBox for its simplicity and cross-platform support.
  • Apache httpd — the most popular web server in the world.
  • MariaDB — we will be using one or more versions of this database engine as a replacement to MySQL (which has been losing popularity in recent years).
  • Various other databases as needed.
  • PHP — we will be using several versions for testing our projects.
  • Linux distributions covered:
    • CentOS — one of the most popular Linux distributions in the world, especially for web servers.
    • Fedora Server — very similar to CentOS, but I will note differences where necessary.
    • Ubuntu LTS Server — this distro is quickly catching up to CentOS in popularity.
    • Debian—another popular distro, which many other distros are based on, including Ubuntu.
    • openSUSE Leap — one of my oldest favorite distros and recently becoming more popular.
    • Arch Linux — while I don’t normally recommend it for servers, this has a dedicated following so I figured I may as well include it.

Do You Need All This?

I’m trying to cover a variety of scenarios so you can develop whatever type of web application you need. The bare minimum you need for a LAMP stack is an operating system, Apache HTTP Server, MariaDB (or some other database), and PHP. So you can skip sections which don’t apply to you.

Why Not Just Use a Package Manager?

There are a variety of reasons why using your Linux distribution’s package manager is not ideal. Pre-compiled binaries often are not as high-performing as packages you build from source. They are also often outdated and many contain bugs. Lastly, it makes side-by-side installations of multiple versions impossible (this is particularly important when you want to run multiple versions of PHP, MySQL, etc.).

Leave a Reply