Installing LAMP (Linux – Apache, MySql, PHP) on Ubuntu 12.04.02

This is one way to install Apache2 webserver, MySql database server, and PHP5 web server support, plus PhpMyAdmin, onto Linux Ubuntu server or Ubuntu desktop v. 12.04.02 distribution.

Credit to Kevin Whitman for his excellent youtube tutorial.

And credit Kevin Whitman’s Blog articles: See: Part 2

Note:  For windows remote SSH access to your Ubuntu server, you should download and execute PuTTY or similar SSH client for establishing a terminal interface to the Ubuntu server IP address.  You can find and download PuTTY open source from here: . This article assumes that Ubuntu server or Desktop version 12.04.02 (32 bit or 64 bit) is already installed as your server.

Installing Apache Webserver on Ubuntu:

root ~> apt-get install apache2 (Enter)
(answer Y(es) to download the installation package and install it.)

Installing MySQL on Ubuntu:

root ~> apt-get install mysql-server
(you should setup a MySQL ‘root’ password when prompted.  Write it down so you won’t forget the password for ‘root.’)

Install PHP on Ubuntu:

apt-get install php5 php5-gd php-pear php5-mysql php5-curl php5-memcache

Y(es) to download etc.

Restart the Apache web server after installing PHP:

root ~> /etc/init.d/apache2 restart (Enter)

Test Your PHP and Apache installation:

Create a php information file called “testinfo.php” to test PHP and Apache.

at the default /var/www/ directory, and the testinfo.php file should have only the following one line of content:

<?php phpinfo() ?>

Create this testinfo.php file using a text editor.  Access it from http://the_server_IP_address/testinfo.php


root~> apt-get install phpmyadmin

select apache

configure the database root password

Copy the phpmyconf file (configuration file) over

ls –s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf

Then restart apache web server 

/etc/init.d/apache2 restart

So, now phpmyadmin will come up in the browser http://Server_IP_address/phpmyadmin

Login to phpMyadmin with the username:  root
and the password you established

Print Friendly, PDF & Email