The Complete Magazine on Open Source

Turnkey: Build LAMP Server in Under 10 Minutes

, / 1166 11

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.

  • HJ91

    @LinuxForYou get LAMPython up and running in less then 8 minutes – #opensource #india #linux #debian Live + install cd

  • krishnashk

    @LinuxForYou do post a article on how to port forward if we r connected via router

  • Harshad Joshi

    a better option is available in india –

    use it as live cd, test apps and if needed, install it on HDD, VM, cloud..anywhere. Updates will be available in feb 2012.

  • Pingback: Building a LAMP Server in under 10 minutes using TurnkeyLinux LAMP Appliance | :: Welcome to Anil's Cloud Adventures ::()

  • Shane

    No 64bit version of any appliance available yet. Great appliances, but very disappointed to see lack of 64bit support.

  • Pingback: Links 4/1/2012: Mozilla Public License 2.0, Pear OS Linux Debian Edition | Techrights()

  • lone wretch

    so, the easy part was googling how to setup the website after installing turnkey. The hard part is fiunding anyone who has an answer on how to set up a website afeter successfully installing turnkey lamp. and the best part is, I hate you .

    Just want a simple god damned guide and yet everything is get vmware get oracle blah blah blah as if thats the damn hard part… ffs

    • DukeAJuke ✓σοφός

      Welcome to Linux bro…

    • Ylletroja

      Things basically could not be more simple though. What you need to do is just FTP in to the files as usually tk sets itself under the root directory and hence visiting your localhost won’t serve the correct stuff. Not very userfriendly… but not really hard to understand or fix.

  • Andy Schilder

    once insatlled, how does one configure apache to display a website from the /var/www directory instead of the turnkey web interface??