====== memcache ====== ===== memcached ===== ==== Installation ==== # aptitude install memcached ==== Configurer ==== C'est là: /etc/memcached.conf ===== libmemcache ===== ==== Installation ==== ''# aptitude install libmemcache-dev'' A partir des sources: $ mkdir -p ~/tmp/mc && cd ~/tmp/mc $ wget http://download.tangent.org/libmemcached-0.35.tar.gz $ tar xvzf http://download.tangent.org/libmemcached-0.35.tar.gz $ cd libmemcached-0.35 $ ./configure ... --- Configuration summary for libmemcached version 0.35 * Installation prefix: /usr/local * System type: pc-linux-gnu * Host CPU: i686 * C Compiler: gcc (Debian 4.3.2-1.1) 4.3.2 * Assertions enabled: yes * Debug enabled: no * Warnings as failure: no --- $ make $ su # make install Les "includes" sont dans: /usr/local/include/libmemcached Les "lib" sont dans: /usr/local/lib ==== Lib ==== Erreur pour une librairie: ... error while loading shared libraries: libmemcached.so.3: cannot open shared object file: No such file or directory Effectivement: $ ldd mc ... libmemcached.so.3 => not found De même que: # ldconfig -p | grep libmemcached === soluce 1 === | :!: marche pas! | (pour un poste de developpement) Soit on adapte **''$LD_LIBRARY_PATH''**, afin d'include le repertoire ou il y a les libs: $ echo $LD_LIBRARY_PATH $ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib === soluce 2 === (pour un serveur en test/prod) Soit on créé le lien symbolique vers la lib: # ln -s /usr/local/lib/libmemcached.so.3 /usr/lib/. ==== Exemples ==== Lien: http://search.cpan.org/~dmaki/Memcached-libmemcached-0.3102/src/libmemcached/docs/libmemcached_examples.pod