In this guide I will show you the easiest way, how to install a LAMP server. LAMP stands for Linux, Apache, MySQL, PHP. There are many methods to install LAMP, for example the standart one see this howto for ubuntu: Howto: Install LAMP and phpMyAdmin on Ubuntu
A few things about memcache: Memcache is a daemon, meaning it runs as a separate service on your machine. Just like MySQL runs as a separate service. In fact, to use memcache in PHP you have to connect to it, just like MySQL.