Originally published at
Creotiv lives here. Please leave any
comments there.
There are two situations with installing fisrt if all is ok and second when after restarting php you get error «undefined symbol: php_json_encode in Unknown on line 0″ or similar.
First type of installation(when all si ok) is:
yum -y install gcc-c++
wget http://launchpad.net/libmemcached/1.0/0.40/+download/libmemcached-0.40.tar.gz
tar xzf libmemcached-0.40.tar.gz
cd libmemcached-0.40
./configure
make
make install
pecl install memcached
echo 'extension=memcached.so' > /etc/php.d/memcached.ini
service php-fpm restart
cd ..
rm -r libmemcached-0.40*
Second type of installation(if first return error) is:
yum -y install gcc-c++
wget http://launchpad.net/libmemcached/1.0/0.50/+download/libmemcached-0.50.tar.gz
tar xzf libmemcached-0.50.tar.gz
cd libmemcached-0.50
./configure
make
make install
wget http://pecl.php.net/get/memcached-2.0.0b2.tgz
pecl install memcached-2.0.0b2.tgz
echo 'extension=memcached.so' > /etc/php.d/memcached.ini
service php-fpm restart
cd ..
rm -r libmemcached-0.50*
rm -r memcached-*