How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

October 20, 2014

Memcached on centos 6.5

Filed under: Linux — Tags: , , , — admin @ 11:57 am

I am trying to install the memcached not the memcache on centos 6.5
Well if you try with pecl install memcached a error will appear and you can’t install it.
A solution is to install it from source.
libmemcached release 1.0.18 – installed from source
php-memcached release 2.1.0 – installed from source & Added memcached.so in php.ini

So basically you download libmemcached and run: configure ; make; make install
And php-memcached and run: phpize; configure; make; make install
After this you can add to /etc/php.d/memcached.ini the line
extension=memcached.so

In order to have sasl please install also this before compiling the libmemcached

yum install cyrus-sasl-devel

January 28, 2013

Centos 6 pecl install memcached error

Filed under: Linux — Tags: , , , — admin @ 5:50 pm

Today I try to install memcached on a server with centos 6. So basically when I hit
pecl install memcached
I get a lot of errors
checking for libmemcached location... configure: error: memcached support requires libmemcached 1.0.x. Use --with-libmemcached-dir= < DIR> to specify the prefix where libmemcached headers and library are located
ERROR: `/var/tmp/memcached/configure' failed

So if I try to install libmemcached by using
yum install libmemcached libmemcached-devel
I see that version of libmemcached will be smaller then 1.0.x

So to install it
cd /usr/local/src
wget https://launchpad.net/libmemcached/1.0/1.0.15/+download/libmemcached-1.0.15.tar.gz
tar -zxvf libmemcached-1.0.15.tar.gz
cd libmemcached-1.0.15
./configure
make
make install

After this try
pecl install memcached

For me this was the working version.

Powered by WordPress