How to install Apache, MySQL, PHP on Ubuntu

edited August 2014 in Proposed How-Tos
LAMP includes Apache, MySQL, PHP and Ubuntu,

Let's start by installing Apache.

Apache is a free open sources software for web servers.

To install apache type these commands:

sudo apt-get update
sudo apt-get install apache2

Or just copy and paste this:

sudo apt-get update; sudo apt-get install apache2

Tahhda. Let's check if Apache was installed correctly. Run the command:

hostname -I and note down that IP. Open up your Internet Browser and direct your browser to that ip e.g This page should say "It Works!"

Step Two- Install MySQL

MySQL is a database management system.

Let's install MySQL, Type these commands

sudo apt-get install mysql-server php5-mysql

During the install MySQL will request for you to setup a password.

Now Once that's installed run these commands

sudo mysql_install_db

then write

sudo /usr/bin/mysql_secure_installation

Step Three- Install PHP

Now write these commands

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt


Sign In or Register to comment.