Memcached script


#This script is only applicable if you installed xampp 5.6.32 from this link
#this is script has to be run only once

apt-get update -y

#install memcached cache server
apt install memcached

sudo apt-get update

#downloading required packages for compiling memcache extension of php
sudo apt-get install build-essential libtool autoconf unzip wge

export PHP_AUTOCONF=/usr/bin/autoconf

export PHP_PREFIX=/opt/lampp/bin/php

#Download memcache


tar -zxf memcache-2.2.7.tgz

cd memcache-2.2.7


./configure --enable-memcache --with-zlib-dir=/opt/lampp --with-php-config=/opt/lampp/bin/php-config


make install

make test

# append to php.ini

echo "" >> /opt/lampp/etc/php.ini

/opt/lampp/ restart apache