Installing Lamp server on Debian

aptitude update && aptitude upgrade

First Install apache2

aptitude install apache2 apache2-doc

Then install mysql

# aptitude install mysql-server mysql-client

# /usr/bin/mysqladmin -u root password ‘your-password-here’

Next install php

# aptitude install php5 php5-mysql libapache2-mod-php5

If you want to install perl,or python or both

# aptitude install perl libapache2-mod-perl2

# aptitude install python libapache2-mod-python

test php

# nano /var/www/apache2-default/test.php

add the following code

Install phpmyadmin

# aptitude install phpmyadmin

To have access to phpMyAdmin on your website (i.e. ) all you need to do is include the following line in /etc/apache2/apache2.conf:

Include /etc/phpmyadmin/apache.conf

Restart Apache

# /etc/init.d/apache2 restart

Access mysql

mysql -u root
mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD(‘new-password’) WHERE user=’root’;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s