Install memcache on ubuntu server by the 6 simple step. if apt-get not work in ubuntu server use aptitude instead of apt-get
Step 1
sudo apt-get update or sudo aptitude update
Step 2
sudo apt-get install mysql-server php5-mysql php5 php5-memcache or sudo aptitude install mysql-server php5-mysql php5 php5-memcache
Step3
sudo apt-get install memcached or sudo aptitude install memcached
Step 4
sudo apt-get install php-pear or sudo aptitude install php-pear
Step 5
sudo apt-get install build-essential or sudo aptitude install build-essential
Step 6
sudo pecl install memcache
Step 7
echo "extension=memcache.so" | sudo tee /etc/php5/conf.d/memcache.ini
Restart The server and You will find out memcache in PHPinfo function
sudo /etc/init.d/apache2 restart