Installing LAMP on Debian 7.0 “Wheezy”

Handy reference when you need to install a LAMP stack on Debian. Note that the L(AMP) is for Linux and this is not covered as this is already set up.

Before starting the installation, make sure your distribution is up to date.

sudo apt-get update
sudo apt-get upgrade

MYSQL the database

sudo apt-get install mysql-server mysql-client

You will be prompted to enter a root password for mysql

Apache2 the webserver

sudo apt-get install apache2 apache2-doc

PHP Scripting Langauage

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

Now to test that it works

sudo gedit /var/www/apache2-default/test.php

and insert the following code.

< ? php phpinfo(); ?>

save the file in /var/www/ as test.php

then point your web browser to http://localhost/test.php and all should work.

phpMyAdmin Administration of MySQL with the use of a web browser

sudo apt-get install phpmyadmin

You will be asked which web server to use, so select apache2 and then enter passwords when prompted.

point the web browser to http://localhost/phpmyadmin/ and access phpmyadmin

One final thing to do which is usual issue with PHP configuration is to enable MySQL. Just edit the file and uncomment the following line (tip: search for extension)

; to

sudo gedit /etc/php5/apache2/php.ini

Leave a Reply




To submit your comment, click the image below where it asks you to...
Clickcha - The One-Click Captcha