Howto Install LAMP in Debian Sqeeze

LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform that uses Linux as operating system, Apache as the Web server, MySQL as the relational database management system and PHP as the object-oriented scripting language.
In this quick tutorial we will explain you how to install LAMP SERVER on Debian Squeeze (For newbies)

The installation of Lamp server  in  Debian Sqeeze  will be done in 3 steps :

1- Install apache2 + php5

Apache is one of the most famous web server which runs on most linux based servers. With just few commands you can configure apache to run with  PHP 5.

root@unixmen-debian6:~# apt-get install apache2 php5 libapache2-mod-php5

your  normal web folder is located in /var/www/

Now  lets  check if php is corectly  installed

vi /var/www/test.php

and  add

{codecitation}<?php phpinfo(); ?>{/codecitation}
save and exit

Now open browser with http://ip/test.php

 

 

2. Installing MySQL Database Server

To install MySQL, as root enter the following command:

apt-get install mysql-server mysql-client php5-mysql

in this  installation you will  get a  windows  to  insert  your root mysql password

– Or  yon can add it manually later  with :

mysql -u root
mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('your-password') WHERE user='root';
mysql> FLUSH PRIVILEGES;

 

3. Install  PhpMyAdmin

Phpmyadmin is   easy webtool  to  manage  you  databases to install  it :

apt-get  install  phpmyadmin

Choose the  webserver that  you want  to use  , in my  case is apache2

Now  open your  browser  with   http://ip/phpmyadmin

 

Enjoy and  feel  free  to  ask