My notes when I installed it on CentOS5.8
Have to install these PECL extensions manually, so we can set the options when doing the configure on them.
Code:
wget https://launchpad.net/libmemcached/1.0/1.0.10/ download/libmemcached-1.0.10.tar.gz
tar -xzvf libmemcached-1.0.10.tar.gz
cd libmemcached-1.0.10
libmemcached wouldn't compile by default:
Code:
root@vps [~/memcache/libmemcached-1.0.10]# make
make all-am
make[1]: Entering directory `/root/memcache/libmemcached-1.0.10'
CXX libhashkit/libhashkit_libhashkit_la-aes.lo
CXX libhashkit/libhashkit_libhashkit_la-algorithm.lo
CXX libhashkit/libhashkit_libhashkit_la-behavior.lo
CXX libhashkit/libhashkit_libhashkit_la-crc32.lo
CXX libhashkit/libhashkit_libhashkit_la-digest.lo
CXX libhashkit/libhashkit_libhashkit_la-encrypt.lo
CXX libhashkit/libhashkit_libhashkit_la-fnv_32.lo
CXX libhashkit/libhashkit_libhashkit_la-fnv_64.lo
CXX libhashkit/libhashkit_libhashkit_la-function.lo
CXX libhashkit/libhashkit_libhashkit_la-has.lo
CXX libhashkit/libhashkit_libhashkit_la-hashkit.lo
CXX libhashkit/libhashkit_libhashkit_la-jenkins.lo
CXX libhashkit/libhashkit_libhashkit_la-ketama.lo
CXX libhashkit/libhashkit_libhashkit_la-md5.lo
CXX libhashkit/libhashkit_libhashkit_la-murmur.lo
CXX libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo
CXX libhashkit/libhashkit_libhashkit_la-str_algorithm.lo
CXX libhashkit/libhashkit_libhashkit_la-strerror.lo
CXX libhashkit/libhashkit_libhashkit_la-string.lo
CXX libhashkit/libhashkit_libhashkit_la-nohsieh.lo
CXXLD libhashkit/libhashkit.la
CXX libmemcached/csl/libmemcached_libmemcached_la-context.lo
In file included from ./libmemcached/common.h:72,
from ./libmemcached/csl/common.h:40,
from libmemcached/csl/context.cc:38:
./libmemcached-1.0/memcached.h:46:27: error: tr1/cinttypes: No such file or directory
make[1]: *** [libmemcached/csl/libmemcached_libmemcached_la-context.lo] Error 1
make[1]: Leaving directory `/root/memcache/libmemcached-1.0.10'
make: *** [all] Error 2
I so needed to install the below:
Code:
yum install gcc44.x86_64 gcc44-c++.x86_64
export CC=/usr/bin/gcc44
export CXX=/usr/bin/g++44
It would then let me configure it.
Code:
./configure
make
make install
Then add the memcached.so to php.ini, and restart apache. I also removed memcache.so as this was going to be replacing it.
Change the Xenforo config to use Libmemcached as the cache handler
Code:
vim /home/worthy/public_html/forum/library/config.php
There are extra things which can be applied against memcached, so I removed the WHM version, and manually installed it from PECL. Igbinary and JSON
Igbinary has been installed via WHM.
Code:
pecl download memcached
tar -xzvf memcached-2.1.0.tgz
cd memcached-2.1.0
phpize
./configure --enable-memcached-igbinary
make
make install
I then downloaded the JSON pecl module, configured that:
Code:
pecl download json
tar -xzvf json-1.2.1.tgz
cd json-1.2.1
phpize
./configure
make
make install
I then recompiled memcached
Code:
cd ../memcached-2.1.0
make clean
./configure --enable-memcached-igbinary --enable-memcached-json
make
make install
added the igbinary.so and json.so extension to php.ini
Restarted apache and memcache
Code:
/etc/init.d/httpd restart
/etc/init.d/memcached restart
I've also installed phpmemcacheadmin in place of the memcache.php file
Code:
mkdir memcached
cd memcached/
wget http://phpmemcacheadmin.googlecode.com/files/phpMemcachedAdmin-1.2.2-r262.tar.gz
tar -xvzf phpMemcachedAdmin-1.2.2-r262.tar.gz
tar -xvzf phpMemcachedAdmin-1.2.2-r262.tar.gz
chmod +r *
chmod 0777 Config/Memcache.php