Maecenas at ipsum quis massa rutrum gravida! Ut in varius orci. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
Phasellus sed lectus nec risus posuere rhoncus sed et ligula. Sed gravida ornare turpis vel euismod. Phasellus quis tortor non lacus sodales rutrum sit amet non est
Donec elit nulla, pulvinar nec porta sed, hendrerit eget metus. Suspendisse porttitor ligula non felis volutpat pretium? Praesent laoreet nisl a eros ultricies in lacinia

L.A.M.P. is an acronym for solution stack of free and open source software. In order to create a viable general purpose web server, this term has been coined from the first letters of Linux (Operating System), Apache HTTP server, MySQL (database software) and Perl/Python/PHP. Generally "P" is taken to be as PHP but it may also refer to Perl or Python. PHP, Perl and Python are web scripting software.

Each package can be configured and installed separately. Here we will see how to install them at one shot. In earlier version of Ubuntu we used to have "tasksel" and "sudo tasksel" to bring various options including "lamp-server". Simply selecting lamp-server use to do the work. But we don't have tasksel in latest Ubuntu. No worries, we still can install the lamp stack in one shot.

Open your terminal. Either press "ctrl+alt+T" or from dash type "terminal" and press enter.

sudo apt-get install php5 mysql-server apache2
The above command will install latest version of PHP which is version 5 and mysql-server with apache http server 2.
You will be prompted in terminal as shown in figure. Give a password for your MySQL "root" user (you can create more users too).






Now to check if its working or not just open your favorite browser and type "localhost" in the address bar. You should see something like this-
(note: this comes from the file index.html located in /var/www/ folder of your system.)







Now to check if php is working or if not, let us create a small php file

Open your terminal and type- sudo vi /var/www/info.php
or you can open the same from gedit or any other editor as
sudo gedit /var/www/info.php
and write:
<?php
phpinfo();
?>
save the file and exit. Restart the apache2 service by typing the command in terminal

sudo service apache2 restart









open your browser and type in address bar the following.
localhost/info.php
and you should see something like this:







yay! you are done now! :-) cheers!

Oh wait. Let us also install phpmyadmin . phpmyadmin helps to take control over our database. It can be done graphically from the browser or from the command line.

to install

sudo apt-get install phpmyadmin
You will be prompted to screen like this-
press space to select apache2 server and enter.






configure phpmyadmin with dbconfig-common. Press yes to configure. give your passwords.






When you are done type "localhost/phpmyadmin" in your address bar of browser, you should see something like this-


give user as "root" and password which you had given before.
you will be taken to phpmyadmin page.
on this page you can create databases, users and many more.

:)


Leave a Reply