Quick and easy way to setup LAMP server on Ubuntu 10.04, including phpmyadmin.
sudo tasksel install lamp-server




Enter a password to create for the root user of mysql, this can be different then your local machines root password. Remember what you set as we will need this password again soon to install phpmyadmin.

Confirm Password

Once the installation has completed, open up Firefox and browse to http://127.0.0.1, you should see the following: If so then the LAMP installation completed successfully.

Now we will install phpMyAdmin so we can manage our databases.
sudo apt-get install phpmyadmin


Use the 'space' key to select "Apache2 then 'tab' to OK and hit enter. If you fail to select "apache 2" then phpmyadmin wont be added into the apache2.conf file and hence apache wont know it exists.

Select Yes to configure with dbconfig-common

Now enter in the mysql root password which we set earlier

Enter in a password for the phpmyadmin database, or leave it blank and one will be generated. In most cases you wont need to use this again.

If you entered a password previously, then enter it again now.

Now browse to http://127.0.0.1/phpmyadmin, you should see the following:
written by