2014-02-13 1 views
0

Я установил следующие пакеты -Работа с Memcache и MySQL с помощью memcache_functions_mysql UDF,

  1. Libevent-2.0.21
  2. Memcached-1.4.17
  3. libmemcached-0,34
  4. memcached_functions_mysql_1.1

Все перечисленные были успешно установлены. Выход из LDCONFIG -v команды (часть, где он показывает, что libmemcached библиотека была включена) выглядит следующим образом:

$ldconfig -v 

/usr/local/libmemcached/lib: 
     libmemcached.so.3 -> libmemcached.so.3.0.0 
     libmemcachedprotocol.so.0 -> libmemcachedprotocol.so.0.0.0 
     libmemcachedutil.so.0 -> libmemcachedutil.so.0.0.0 

Но когда я пытаюсь загрузить ОДС в MySQL с помощью install_functions.sql, который поставляется с memcache_functions он выдает следующее сообщение об ошибке:

ERROR 1126 (HY000) at line 38: Can't open shared library 'libmemcached_functions_mysql.so' (errno: 0 libmemcached.so.3: cannot open shared object file: No such file or directory) 

и содержимое каталога плагинов являются:

-rw-r--r-- 1 root root 6.1K Jan 21 13:49 adt_null.so 
-rw-r--r-- 1 root root 11K Jan 21 13:49 auth.so 
-rw-r--r-- 1 root root 6.0K Jan 21 13:49 auth_socket.so 
-rw-r--r-- 1 root root 6.2K Jan 21 13:49 auth_test_plugin.so 
-rw-r--r-- 1 root root 35K Jan 21 13:49 ha_example.so 
-rw-r--r-- 1 root root 10K Jan 21 13:49 libdaemon_example.so 
-rw-r--r-- 1 root root 361K Feb 13 02:47 libmemcached_functions_mysql.a 
-rwxr-xr-x 1 root root 1.1K Feb 13 02:47 libmemcached_functions_mysql.la 
-rwxr-xr-x 1 root root 167K Feb 13 02:47 libmemcached_functions_mysql.so 
-rwxr-xr-x 1 root root 167K Feb 13 02:47 libmemcached_functions_mysql.so.0 
-rwxr-xr-x 1 root root 167K Feb 13 02:47 libmemcached_functions_mysql.so.0.0.0 
-rw-r--r-- 1 root root 11K Jan 21 13:49 mypluglib.so 
-rw-r--r-- 1 root root 5.9K Jan 21 13:49 qa_auth_client.so 
-rw-r--r-- 1 root root 11K Jan 21 13:49 qa_auth_interface.so 
-rw-r--r-- 1 root root 6.0K Jan 21 13:49 qa_auth_server.so 
-rw-r--r-- 1 root root 39K Jan 21 13:49 semisync_master.so 
-rw-r--r-- 1 root root 15K Jan 21 13:49 semisync_slave.so 

ответ

0
Installing memcached on Ubuntu 12.04.1 LTS (64 bit) 

Python - 2.6.8 
MySQL – 5.5.28 
Zope – 2.12.19 

1. Install memcached 

    apt-get install memcached 

2. Install libmemcached -0 .34 (Version is very important. May or may not work with other versions). 

    Download it from https://launchpad.net/libmemcached/ 

    tar xvf libmemcached-0.34.tar.gz 
    sudo ./configure --prefix=/usr/lib/libmemcached --with-memcached=/usr/bin/memcached 
    sudo make 
    sudo make install. 

3. Install memcached_functions_mysql (Version 1.1 used at the time of the installation. (To create UDF’s that are invoked by triggers to manipulate the cache). 

    Downloading from https://launchpad.net/memcached-udfs 

    sudo ./configure --prefix=/usr/local/memcached_mysql --libdir=/usr/lib/mysql/plugin --with-mysql=/usr/bin/mysql_config --with-libmemcached=/usr/lib/libmemcached 
    sudo make 
    sudo make install 

    Navigate to the “sql” folder inside the memcached_mysql_functions directory. 

    mysql –u <username> -p < install_functions.sql 

4. For Zope users 

    Install python-memcached-1.53 

    Download it from https://pypi.python.org/pypi/python-memcached/ 
    Navigate to the extracted python-memcached directory. 

    /home/zope/zope/bin/python setup.py install 

5. Edit the script containing which imports the modules. 

    allow_module('memcache') 

    from memcache import Client 
    allow_class(Client) 
    allow_module('memcache.Client.get') 
    allow_module('memcache.Client.set') 

This is done so that memcache can be imported and used in your Restricted Python scripts. 
If an external method is used to handle the above case, then the file does need to be updated with the above content. 
Смежные вопросы