Outils pour utilisateurs

Outils du site


programmation_memcached

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
programmation_memcached [2009/12/30 22:14] thierryprogrammation_memcached [2010/01/07 13:03] (Version actuelle) thierry
Ligne 3: Ligne 3:
 ==== Installation ==== ==== Installation ====
   # aptitude install memcached   # aptitude install memcached
 +==== Configurer ====
 +C'est là: 
 +  /etc/memcached.conf
  
 ===== libmemcache ===== ===== libmemcache =====
-==== Source ====+==== Installation ==== 
 + 
 +<del>''# aptitude install libmemcache-dev''</del> 
 + 
 +A partir des sources: 
 +  $ mkdir -p ~/tmp/mc && cd ~/tmp/mc
   $ wget http://download.tangent.org/libmemcached-0.35.tar.gz   $ 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
  
-==== Installation ==== 
-  # aptitude install libmemcache-dev 
  
programmation_memcached.1262211253.txt.gz · Dernière modification : 2009/12/30 22:14 de thierry