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.
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 browser and type in address bar the following.
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
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.
:)
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 apache2The 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.phpor you can open the same from gedit or any other editor as
sudo gedit /var/www/info.php
and write:save the file and exit. Restart the apache2 service by typing the command in terminal
<?php
phpinfo();
?>
sudo service apache2 restart
open your browser and type in address bar the following.
localhost/info.phpand 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
You will be prompted to screen like this-
sudo apt-get install phpmyadmin
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.
:)
Categories:
guide,
hacks,
how to install,
install,
linux class,
LinuxCandy,
oneiric ocelot,
Ubuntu,
Ubuntu how to's,
ubuntu 11.10,
Ubuntu Oneiric