:::: MENU ::::
Software

Install LAMP server Ubuntu 12.04

LAMP is a solution stack of free, open source software. The acronym LAMP refers to the first letters of Linux (operating system), Apache HTTP Server, MySQL (database software ) and PHP (but now sometimes Perl or Python), principal components to build a general purpose web server.

This tutorial will walk you through the installation of LAMP server on Linux Ubuntu 12.04 Precise Pangolin with the following easy steps.

install lamp server ubuntu

STEP 1:

Install the LAMP server.

The Ubuntu developers made easy to install and configure the LAMP server with a single terminal command. Open the terminal by pressing Ctrl+Alt+T or Navigate through Applications -> Accessories -> Terminal

sudo apt-get install lamp-server^

Don’t leave out the caret (^) at the end and to exit the Terminal after your use by typing exit command.

The apt package manager will now show the packages to be installed and ask for confirmation. Type Y and press Enter to confirm and continue with the install.

After downloading the packages, you have to set a password for the MySQL database root user.

Don’t leave it blank. So enter the ‘password’ for the MySQL database root user. And also confirm your password.

After confirming your password, apt will continue to installing the remaining packages. Now your LAMP server installation is complete. Next, do few more steps to configure LAMP server to work with your system.

STEP 2:

Configure the LAMP server.

Test Apache

Open your favorite web browser window and enter the address http://localhost/. You should see a web page “It Works!”

setup lamp server ubuntu

Test PHP

We just confirmed that the Apache web server works, so next is to make sure that PHP installation is working,

Open a terminal. In Gnome navigate through Applications>Accessories>Terminal OR use “Ctrl+Alt+T” short cut.

Type, sudo nautilus then hit enter, and enter your ‘password’ too,

a new window opens, Go to File System -> var -> www . Cretae a new text document file named info.txt.

open the file and enter the following codes,

<?php
phpinfo();
?>

and rename the file into info.php . Close the window and also type ‘exit’ enter on terminal. Open your favorite web browser window and enter the address http://localhost/info.php, and you can see a page displaying all the information about your PHP installation.

OR Use your favorite IDE (Netbeans or Eclipse) and create the phpinfo.php file on root of var/www directory with above code and open the same page on browser http://localhost/info.php.

install lamp ubuntu 12.04

STEP 3:

Installing the phpMyAdmin.

phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the World Wide Web. phpMyAdmin supports a wide range of operations with MySQL. The most frequently used operations are supported by the user interface (managing databases, tables, fields, relations, indexes, users, permissions, etc), while you still have the ability to directly execute any SQL statement.

Open terminal and type sudo apt-get install phpmyadmin enter.

Next step is to configure a web server with phpMyAdmin. Use the arrow keys on your keyboard to highlight apache2 and then use the space bar to select it enter to continue.

Next is to configure database called dbconfig-common with phpMyAdmin. Select Yes and press the ‘space bar’.

Next step is to enter the MySQL root password you created earlier and hit Enter.

The final step is to,

Test phpMyAdmin

Open your a web browser window and enter the address http://localhost/phpmyadmin, and you can see a page displaying like below.

install lamp server ubuntu 12.04

You can log in with the username root and the root password that you created earlier.

lamp server install ubuntu 12.04

Thanks……..

Leave a comment

Before hitting COMMENT button, please fill * marked fields and the correct reCAPTCHA response.
  •