1. Install libmemcached download libmemcached1.0.16: wgetlaunchpad.netlibmemcached1.01.0.16downloadlibmemcached-1.0.16.tar.gztar-xzflibmemcached-1.0.16.tar.gz. configure-prefixusrlocallibmemcached-with-memcachedusrlocal
1. Install libmemcached download libmemcached1.0.16: wget https://launchpad.net/libmemcached/1.0/1.0.16/download/libmemcached-1.0.16.tar.gz tar -xzflibmemcached-1.0.16.tar.gz./configure-prefix =/usr/local/libmemcached-with-memcached =/usr/local/
1. Install libmemcached
Download libmemcached1.0.16:
Wget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz
Tar-xzf libmemcached-1.0.16.tar.gz
./Configure-prefix =/usr/local/libmemcached-with-memcached =/usr/local/memcached/bin/memcached
Make
The following error occurs:
Make-j3 all-ammake [1]: entering directory '/root/soft/libmemcached-1.0.16' CXX libhashkit/libmemcached_libmemcached_la-aes.lo CXX libhashkit/libmemcached_libmemcached_la-algorithm.lo CXX libhashkit/libmemcached_libmemcached_la-behavior.lo CXX libhashkit/libmemcached_libmemcached_la-crc32.lo CXX libhashkit/libmemcached_libmemcached_la-digest.lo CXX libhashkit/libmemcached_libmemcached_la-encrypt.lo CXX libhashkit/libmemcached_libmemcached_la-fnv_32.lo CXX /libmemcached_libmemcached_la-fnv_64.lo CXX libhashkit/libmemcached_libmemcached_la-function.lo CXX libhashkit/libmemcached_libmemcached_la-has.lo CXX libhashkit/libmemcached_libmemcached_la-hashkit.lo CXX libhashkit/libmemcached_libmemcached_la-jenkins.lo CXX incubator/libmemcached_libmemcached_la-ketama.lo CXX incubator/libmemcached_libmemcached_la-md5.lo CXX incubator/libmemcached_libmemcached_la-murmur.lo CXX libhashkit/libmemcached_libmemcached_la-murmur3.lo CXX libhashkit/libmemcached_libmemcached_la-one_at_a_time.lo CXX incubator /libmemcached_libmemcached_la-murmur3_api.lo CXX libhashkit/libmemcached_libmemcached_la-rijndael.lo CXX libhashkit/libmemcached_libmemcached_la-str_algorithm.lo CXX libhashkit/libmemcached_libmemcached_la-strerror.lo CXX libhashkit/libmemcached_libmemcached_la-string.lo CXX libhashkit/libmemcached_libmemcached_la-nohsieh.lo CXX libmemcached/libmemcached_libmemcached_la-allocators.lo CXX libmemcached/libmemcached_libmemcached_la-analyze.loIn file encoded from. /libmemcached/common. h: 114, from libmemcached/analyze. cc: 1 :. /libmemcached-1.0/memcached. h: 46: 27: error: tr1/cinttypes: No such file or directoryIn file stored ded from. /libmemcached/common. h: 114, from libmemcached/allocators. cc: 38 :. /libmemcached-1.0/memcached. h: 46: 27: error: tr1/cinttypes: No such file or directorymake [1]: *** [libmemcached/libmemcached_libmemcached_la-analyze.lo] error 1 make [1]: * ** waiting for unfinished tasks .... make [1]: *** [libmemcached/libmemcached_libmemcached_la-allocators.lo] Error 1 make [1]: Leaving directory '/root/soft/libmemcached-1.0.16 'make: *** [all] Error 2
It is found that the gcc version is incorrect.
So first update the gcc version
Yum install gcc44 gcc44-c ++ libstdc ++ 44-devel
Export CC =/usr/bin/gcc44
Export CXX =/usr/bin/g ++ 44
Re-execute the configure of libmemcached:
./Configure-prefix =/usr/local/libmemcached-with-memcached =/usr/local/memcached/bin/memcached
Make
Make install
Succeeded
2. Install the memcached extension of php
Cd memcached-1.4.5;
The following error is reported when/usr/local/php/bin/phpize is executed several times.
Cannot find config.m4. Make sure that you run '/usr/local/php/bin/phpize' in the top level source directory of the module
Later I found that this is not the php memcached extension directory, and then find the memcached php extension directory memcached-1.0.2, heaven, where do I know this is memcached php extension directory ah, I thought it was the source code directory of the lower version of memcached.
Cd memcached-1.0.2;
Run
/Usr/local/php/bin/phpize
The world has become better. First copy the result to a notebook.
Then run./configure -- with-php-config =/usr/local/php/bin/php-config -- with-libmemcached-dir =/usr/local/libmemcached.
The fate is still too long, and an error is reported
Make: *** [php_memcached.lo] Error 1
Libmemcached version is too high.
Then proceed to configure, make, make install
Success is really hard
Then add extension = "memcached. so" to php. ini"
Restart php-fpm and webserver (nginx is used here)