How to Install LAMP Ubuntu 14.04

LightNode
By LightNode ·

LAMP is shorthand for Linux Apache MySQL PHP, which means that Apache, MySQL, and PHP are installed on a Linux system. LAMP architecture is currently one of the mature enterprise web application models. I'll show you how to install LAMP Ubuntu 14.04.

1. Install Apache2

Make sure there are no remnants of previously installed packages on your system first.

sudo apt-get autoremove apache2

Then install apache2.

sudo apt-get install apache2

There are two questions, direct 'Y' is fine.

After the installation, you can access it by typing localhost in your browser, and the following screen will appear.

Install LAMP Ubuntu

However, to be on the safe side, we recommend that you try restarting the server again, and if it succeeds, only then is the installation really successful.

Reboot the server.

sudo /etc/innit.d/apapche2 restart

Shutting down the server.

sudo /etc/innit.d/apapche2 stop

Open server.

sudo /etc/innit.d/apapche2 start

2. Install PHP

Now, we begin to install PHP.

sudo apt-get install php5 libapache2-mod-php5

There are also two questions, direct 'Y' is fine.

3. Install MySQL

After finish installing PHP, we need to install MySQL.

sudo apt-get install mysql-server

During the period will let people set a password, it is recommended to set a password.

Then check the installation.

mysql -u root -p

Enter your password you st just now. If there is no fault, you have done.

4. Install association

You have to install these association, then the LAMP will work.

sudo apt-get install libapache2-mod-php5
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install php5-mysql
sudo apt-get install php5-gd

5. finish

Wait for the installation to complete.

Now you can enjoy it.