Video Tutorial: Installing LAMP Stack plus phpMyAdmin in Ubuntu

embedded by Embedded Video

File Attachment: Transcript PDF

Video Transcript:

Welcome everyone!

My name is Ahmer Zaidi and welcome to AhmerZaidi.com.

In this video tutorial, I will show you how to install a LAMP stack on Ubuntu Linux using APTITUDE, which is the Ubuntu default package management application. In order to install the LAMP stack your Linux machine must be connected to the Internet.

LAMP is an acronym which stands for Linux, Apache, mySQL and PHP.

In addition to the LAMP stack I will be installing a web based administration package for mySQL, called phpMyAdmin.

Let’s get started.

Here I have a fresh install of Ubuntu Linux. Ubuntu is absolutely free can be downloaded at Ubuntu.com.

To begin, I am going to launch two (2) applications which you will be using to install and validate the LAMP stack.

Terminal is the command line interface for the operating system which you will be using to install the various components of the LAMP stack. Terminal can be found under:

Applications > Accessories > Terminal

Next, I am going to launch a web browser. Any web browser will due; I am going to go with the system default, which in this case is Firefox.  The web browser will validate the Apache Web Server and PHP installations. Firefox can be found under:

Applications > Internet > Firefox Web Browser

You are going to install six (6) different packages that will work together to create the LAMP stack plus phpMyAdmin.

Before you begin installing the six (6) packages, I recommend updating the APTITUDE package manager with the latest list of available packages.

In Terminal type:

sudo apt-get update

The “sudo” command must be used in order to install any and all packages on the system; in short, providing you with temporary superuser access to the system.

You may be prompted to enter a password.  This is a superuser level password, which by default is assigned to the user account created during installation of the operating system.

Now that the package lists have been updated, I’m going to type “clear” to clear the terminal windows to avoid any confusion. I will be using the “clear” command before all package installation commands.

In order to install the Apache web server, in Terminal type:

sudo apt-get install apache2

Type “Y” when prompted to continue installation; Apache will take a few moments to download and install.

Once installation has completed, open the Firefox Web Browser windows and navigate to:

http://localhost

If you see a webpage saying “It works!” Apache has been successfully installed.

You will now install the various PHP 5 packages in order for PHP to work seamlessly with Apache and mySQL

In Terminal type:

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

Type “Y” when prompted to continue installation; PHP will take a few moments to download and install. Here you are installing 3 different applications in a single installation command.

In order to test if PHP is working properly, you need to create a .php file and place it in the web directory folder which, by default, is /var/www. By default, you do not have write permission on to this folder, so you need to change that by modifying the ownership of the folder.

In Terminal type:

sudo chown –R  yourusername /var/www

In my case, my user name is “ahmer”, you must replace this with your own username.

You must now create a .php file to test if the PHP application installed correctly.

In Terminal type:

gedit /var/www/testinfo.php

The gedit text editor will open up. Type:

<?php

phpinfo();

?>

Save the file and close gedit.

Open the Firefox Web Brower window and navigate to:

http://localhost/testinfo.php

Oops. You are prompted to download the testinfo.php file we created, meaning PHP is not configured properly.

Any changes made to the configuration of Apache while a server is running will not take effect until the server is restarted.

Cancel the download window.

In Terminal type:

sudo /etc/init.d/apache2 restart

Now that Apache has restarted, go back to your web browser and navigate to:

http://localhost/testinfo.php

You should now see a webpage containing your PHP configurations, this means PHP has installed successfully.

You are almost done.

Now you must install the mySQL database management system.

In Terminal type:

sudo apt-get install mysql-server

Type “Y” when prompted to continue installation; mySQL will take a few minutes to download and install; it is a fairly large package.

During installation you will be prompted to set and verify the password for the mySQL administrative “root” user. This password is very sensitive and must be kept secret.

There are various ways to validate the mySQL install. You will be installing the web based administration package for mySQL, phpMyAdmin, for validation.

In Terminal type:

sudo apt-get install phpmyadmin

Type “Y” when prompted to continue installation; phpMyAdmin will take a few moment to download and install.

During installation, you will have to choose a web server that will be reconfigured to work with phpMyAdmin.

Choose “apache2” by pressing the space bar and then press “Enter”

Assuming you are not an advance database administrator, choose “No” when prompted to configure with dbconfig-common.

Since phpMyAdmin reconfigured the Apache Web Server, you must restart the web server.

In Terminal type:

sudo /etc/init.d/apache2 restart

Open the Firefox Web Browser windows and navigate to:

http://localhost/phpmyadmin

You should now be able to see the phpMyAdmin login page.

Log in using the mySQL root user account.  Username is “root”. Password is the root password you set during the mySQL installation.

If you have successfully logged in, you should see the two (2) default databases in the left side menu: information_schema and mysql.

You have now successfully installed a LAMP Stack plus phpMyAdmin on Ubuntu Linux.

Remember, all your web pages must be stored in the /var/www directory.

This concludes the video tutorial on installing a LAMP Stack plus phpMyAdmin on Ubuntu Linux.  Please leave your comments.  Once again, my name is Ahmer Zaidi. Thank you for watching.

3 Responses to “Video Tutorial: Installing LAMP Stack plus phpMyAdmin in Ubuntu”

  1. bob said:

    Oct 20, 09 at 11:18 AM

    I love this tutorial! Its simple and very well done.

  2. poorani said:

    May 07, 10 at 12:21 AM

    its simple and crispy
    vow .. thanks

  3. Alanda McCarley said:

    Feb 24, 11 at 6:34 PM

    Your instruction regarding downloading a LAMP STACK was the most concise and easy to follow instruction that I’ve encountered. For ‘Newbies” like me, however, I think you should add that the user start the installation from the OPT directory.

    Thanks,

    Alanda


Leave a Reply