To install phpmyadmin under ubuntu, just one command:
Sudo apt-get install phpmyadmin
After the installation is complete, enter http://localhost/phpmyadmin in the browser
A 404 error occurs because the phpmyadmin directory is not mapped to the apache directory; modify it as follows:
Enter command:
Sudo ln –s /usr/share/phpmyadmin /var/www
Note: There is a space between /usr/share/phpmyadmin and /var/www. ln –s also has spaces
Just enter http://localhost/phpmyadmin in the browser.