Whether you are installing from PECL or installing from the Apt-get command, the memcached modules on the installation are supported without the Igbinary serialization component, and because Igbinary has great performance advantages, try to use Igbinary As the serialization component of the memcached.
Environment description
Operating system: Ubuntu Server 14.04 64-bit
php:php 5.5.9
Build process
First, install the PHP development version
yuanyu@usvr:~$ sudo apt-get install Php5-dev
then install the dependent libraries
yuanyu@usvr:~$ sudo apt-get install Libevent-dev
yuanyu@usvr:~$ sudo apt-get install Pkg-config
Next, install the Igbinary module
yuanyu@usvr:~$ sudo pecl install igbinary
build libmemcached from source code
Get libmemcached's source code, here is the 1.0.18 version
yuanyu@usvr:~$ CD tmp
yuanyu@usvr:~/tmp$ wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
Unzip, configure, and build
yuanyu@usvr:~/tmp$ Tar xzvf libmemcached-1.0.18.tar.gz
yuanyu@usvr:~/tmp$ CD libmemcached-1.0.18
yuanyu@usvr:~/tmp/libmemcached-1.0.18$./configure
yuanyu@usvr:~/tmp/libmemcached-1.0.18$ make
yuanyu@usvr:~/tmp/libmemcached-1.0.18$ sudo make install
Build php5-memcached from source code
Use PECL to get php5-memcached's source code, and then enable--enable-memcached-igbinary when configured.
yuanyu@usvr:~/tmp$ pecl Download memcached-2.2.0
yuanyu@usvr:~/tmp$ Tar xzvf memcached-2.2.0.tgz
yuanyu@usvr:~/tmp$ CD memcached-2.2.0
yuanyu@usvr:~/tmp/memcached-2.2.0$ phpize
yuanyu@usvr:~/tmp/memcached-2.2.0$./configure--enable-memcached-igbinary--DISABLE-MEMCACHED-SASL
yuanyu@usvr:~/tmp/memcached-2.2.0$ make
yuanyu@usvr:~/tmp/memcached-2.2.0$ sudo make install
Configure PHP to join the newly built two modules
Upon completion of the build step above, you will generate 2 so files in the PHP Extension module: igbinary.so and memcached.so, and configure the two files into your operating environment.