Skip navigation

In this post i will teach you how to install LAMP on a linux platform. I choose Ubuntu 9.04 to try with the installation.although it has also been tested on ubuntu 8.04

LAMP consist of 3 vital components 1.Apache 2.Mysql 3.PHP and in addition phpmyadmin

Apache Installation

First open the terminal console window (Applications->Accessories->Terminal). Next type in the following command

sudo apt-get install apache2

Follow the onscreen instructions and once the installation is completed type in http://localhost/ in the address bar of your browser. You should see a screes with “It Works!”. This means that the apache installtion is completed successfully.

Next ins the PHP installation.

PHP5 Installation

To install PHP5 type in the following command in the terminal window.

sudo apt-get install php5 libapache2-mod-php5

Follow the on screen instructions for the setup to complete.Once done test the php installtion by creating a php file (test.php) and placing it in the /var/www/ folder of the filesyste,. Next restart your apache using the following command

/etc/init.d/apache2 restart

Now type http://localhost/test.php in your browser address bar. If the php file is executed successfully then the php is successfully installed.

Mysql Installation

To install type in the following command in the terminal window

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

Once the installtion is completed you get a window to set  the mysql roor password it looks as shown below.

mysqlroot

Now your Mysql installation is completed successfully.

We have successfully completed Installting LAMP. Now the additional and very vital tool needed for database management.phpmydmin

phpmyadmin installation

Inside the terminal window add the following command

sudo apt-get install phpmyadmin

During the installation process you will get a window asking you to choose the webserver to be used for phpmyadmin.Please select apache2 as the web server.Once done. you will have to copy the phpmyadmin folder from usr/share/phpmyadmin/ to /var/www/phpmyadmin

Once copied type in http://localhost/phpmyadmin and you get a login form . Enter the database username and password set previously and login.

If login is successfully, Then you have easily made it to the installtion. Now you have successfully installed LAMP on your Linux System.

Hope you Enjoyed reading the article and turned out to be handy. Thank you for reading.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: