Install LAMP (Linux, Apache, MySQL, PHP) in Ubuntu 13.10 Server

Last updated: October 29, 2013

LAMP ubuntu 13.10This tutorial show you how to install LAMP in Ubuntu 13.10 Server. LAMP stands for Linux, Apache, MySQL, and PHP. It is a combination of these 4 that suitable for building high-availability heavy-duty dynamic web sites.

Linux is a Unix-like and POSIX-compliant operating system. Ubuntu is one of popular Linux distributions.

Apache is a HTTP web server, the most popular in use. It serves webpages when they’re requested by the web browsers. When you type an URL on your web server and press Enter, the pages you see on screen is most likely served by Apache webserver.

MySQL is a database management system now owned by Oracle Corporation. It stores and organizes references to the information the webserver needs.

PHP is a reflective programming language, which makes it possible for all these different parts to work together.

Tutorial Objectives:

  • Install LAMP Stack in Ubuntu 13.10 Server
  • Enjoy!

To get started, run single command below to install them:

sudo apt-get install lamp-server^

While the installing process, you’ll be prompt to set a password for MySQL root user.

To check out if Apache is working, type http://ubuntuserverip in client web browser or localhost in the local browser:

apache is working

apache is working

To check out if PHP is working, run command below to create a test php file in root of Apache webserver directory:

sudo vi /var/www/info.php

Press i to start editing, and type in following lines:


After that, press Esc to exit editing. Press Shift + : and followed by wq and Enter to save the changes.

Now, type http://ubuntuserverip/info.php in client’s browser or localhost/info.php in local browser, you’ll see:

php & mysql is working

php & mysql is working

Scroll down to find out if there’s a section about Mysql, it means that Mysql is working too!

Now your LAMP server is up and working, see how to install wordpress in Ubuntu 13.10.


I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee:

6 responses to Install LAMP (Linux, Apache, MySQL, PHP) in Ubuntu 13.10 Server

  1. Great tutorial. Worked for me. Excellent!

  2. I am so new to Linux and have been using Wampserver2 for quite awhile but I really was having trouble getting it configured right. This tutorial, after looking at many, was dead on. The one thing the other tutorials assumed is that their readers knew anything about Linux. Like typing ‘i’ to start inserting to write the little phpinfo php. grrrr.


  3. Trabalho muito bem feito ou tutorial muito bem elaborado.

  4. Apache work for me but not the others things… If someone can give me a hand….

  5. Nice tutorial for Ubuntu, but the process for installing php on Debian distro same as well? My website is installed on Debian, but it was done through Cloudways platform that does that automatically. I believe I should know how to do it manually, if the need arises.

  6. For me, it was necessary top copy (on Ubuntu 16.04) the file into the directory before PHP would show. Thank you for the posts!