Из командной строки:
sudo apt-get install taskselsudo tasksel install lamp-server
https://help.ubuntu.com/community/ApacheMySQLPHP