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. http://example.com/phpmyadmin/ ) 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’;
mysql> FLUSH PRIVILEGES;

Advertisements