How to Install LAMP on Ubuntu 15.04 (Part 1)

How to Install LAMP on Ubuntu 15.04 Part 1


How to install LAMP on Ubuntu 15.04 Part 2

In this guide I will show you how to install LAMP on an existing Ubuntu 15.04 server. LAMP stands for Linux, Apache, MySQL, and PHP. (Nowaday, many people have moved to MariaDB instead of MySQL.)

Part 1: Installing Ubuntu Server 15.04

Insert the Installation DVD, boot the computer up and change the boot order to DVD as the first boot device. Choose the language.

Choose Install Ubuntu Server

Choose the installation language.

Choose the country

Select No to detecting keyboard layout

Choose keyboard as English.

Choose keyboard layout as English.

Enter the host name as Ubuntu1504

Enter the full name for the administrator

Enter a user name for the account.

Choose a password and repeat.

Do not encrypt home directory.

Choose the time zone. In my case, I accept the default.

Use entire disk Guided.

Choose the disk to partition.

Allow write changes to disk.

Leave proxy information as blank.

Choose No automatic updates.

Choose to install OpenSSH server.

Choose to install GRUB boot loader.

Installation has completed, press Continue.

The server will restart. Login with the user name and password we entered earlier. Type ipconfig to show the IP address of the server.

Elevate the account, enter the password when asked. Type

sudo su

Set static IP address for the server

We will configure this server with a static IP address of, subnet mask of, and default gateway of

Type vi /etc/network/interfaces

Type the following contents.

Now restart networking service:

service networking restart

Now change the nameserver (DNS) so that the server can resolve Internet hosts.

vi /etc/resolv.conf

Type the following lines:

Exit, save the file and ping The ping should be successful.

Now, we can SSH into the server from a remote host.

Enter the required password for your account and you are at the terminal screen.

Elevate the account

Perform the update:

apt-get update

Then upgrade.

apt-get upgrade

Confirm Y to continue.

Wait for the upgrade to complete.

That’s it!