The Complete Magazine on Open Source

Turnkey: Build LAMP Server in Under 10 Minutes

9.28K 12

Turnkey to LAMP

Many of us have wanted to work on our own homemade Linux Web server, but struggled due to the lack of appropriate versions, and the knowledge to set up PHP support or even  dynamic DNS. Well, fear no more; it is no longer rocket science to set up a LAMP stack at your home or office, thanks to virtual appliances from Turnkey Linux. In this article, I walk you through a simple, effective way to set up your own LAMP virtual server, using a preconfigured ISO.

Turnkey Linux is a virtual appliance library that integrates and polishes the very best open source software into ready-to-use solutions. Each virtual appliance is optimised for ease of use, and can be deployed in just a few minutes on bare metal, in a virtual machine, or on the cloud.

Before we get into setting up our own LAMP Virtual Server using a preconfigured ISO, let us evaluate our options.


  • Virtual Machine software: VMWare Player or Oracle VirtualBox? For the purposes of this article, we will use the free VMWare Player 3, which you can download from here.
  • Download the LAMP server ISO image from Turnkey’s website.
  • Once the above ISO has been downloaded, place it on your desktop or home directory.
  • A host operating system — Linux, Windows, BSDs or whatever. Unfortunately, I’m using a Windows host as I write this article, since I don’t currently have any Linux host at my disposal.

Installing into a VM

  1. Launch VMWare Player.
  2. Click the Create a New Virtual Machine option.
  3. You will now be presented with the New Virtual Machine Wizard, as shown in Figure 1, asking for the install source (your optical drive, or an ISO image), or whether you would like to install the OS later. Choose the last option, and click Next.

    New Virtual Machine Wizard

    Figure 1: New Virtual Machine Wizard

  4. In the Guest Operating System screen (see Figure 2), choose Linux, and Ubuntu, and click Next.

    Choosing a Guest Operating System

    Figure 2: Choosing a Guest Operating System

  5. Give the VM a name, and click Next.
  6. Now, you need to allocate disk space. As you can see in Figure 3, I have chosen 8 GB; feel free to choose whatever is appropriate for your environment, and click Next.

    Disk Configuration

    Figure 3: Disk Configuration

  7. In the final screen of the wizard (Figure 4), click Customize Hardware.

    Final screen

    Figure 4: Final screen

  8. We need to set up our Turnkey LAMP ISO as the media to boot from (see Figure 5). Click New CD/DVD, and in the Connection section, choose Use ISO image file; click Browse and navigate to the location of the Turnkey Linux LAMP ISO, and choose it.

    Set up an ISO image location

    Figure 5: Set up an ISO image location

  9. Now, click OK twice, and click Play Virtual Machine.
  10. At the Turnkey Linux bootloader screen (see Figure 6), choose Install to Hard disk and hit Enter.

    Install to hard disk –- LAMP Stack Boot splash

    Figure 6: Install to hard disk –- LAMP Stack Boot splash

  11. Follow the on-screen instructions, and choose to install with auto-partitioning. Choose the second option that shows up, Guided Partitioning — Use Entire Disk.
  12. When it comes to choosing the GRUB installer, choose Yes.
  13. When the installation is done, click Yes to reboot.
  14. Enter the passwords for the root and mysql users, when prompted.
  15. The Backup and Migration utility (TKLBAM) doesn’t require setting up an Amazon EC2 instance. It works with local installations just as well. However, if you wish to store your backup data on Amazon, you need to subscribe to Amazon’s cloud storage service. Click Skip for the time being…
  16. You will now be prompted to install security updates; please choose Install, as it is a one-time operation. Once the updates have been applied, you should see a screen like the one shown in Figure 7.

    TKL LAMP Appliance Services Console

    Figure 7: TKL LAMP Appliance Services Console

Checking it out

Do a test connection to the appliance by visiting the IP address mentioned in the console, which may differ for your installation. Figures 8 and 9 show the server home page and Apache service status.

Turnkey Linux LAMP home page

Figure 8: Turnkey Linux LAMP home page

Apache Web server status

Figure 9: Apache Web server status

To make things even more user-friendly, Turnkey Linux has included the famous Webmin (Web-based server administration for managing Linux servers) as part of this appliance. To access the Web Console, from the home page click the Webmin icon. You will be asked to accept the security settings; do so and you will be taken to the Webmin login page.Log in as root, with the password you set during the first boot. The Webmin home page is shown in Figure 10.

Webmin home page

Figure 10: Webmin home page

Now wasn’t that a breeze? You now have your personal LAMP stack up and running, ready to serve your websites…
I hope you found this tutorial informative and feel free to share your feedback.



Your email address will not be published.