Installing LAMP server on ubuntu

LAMP is a open source web server to set up websites. It is used to get access to website locally. It include Linux, Apache, Mysql and PHP/Python/Perl.

How to setup a lamp server ?

Installing LAMP is not a difficult task, you just need to copy some codes to your terminal and here it is.

Installing LAMP on ubuntu

Installing Apache

$ sudo apt-get install apache2

To check whether apache is installed or not, you can type http://localhost/ on your address bar and you will be redirected to an apache page.

Installing MySQL

$ sudo apt-get install mysql-server

Installing PHP

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

Restarting apache

$ sudo /etc/init.d/apache2 restart

Try again to check your localhost

Also you can check about php

$ php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";'

 

If you have successfully completed all of these, then congratulations you have installed LAMP in your pc.

 

 

 

” Always hope for the best and work for the worst “

Advertisements

One Comment

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