Linux Compile and Install MemcacheQ Method

  

MemcacheQ as a simple distributed queue service, because I don't know about MemcacheQ, many people have encountered a lot of trouble in the installation of MemcacheQ, Xiaobian will introduce MemcacheQ in Linux for everyone. Compile and install under the system, so that everyone has a more detailed understanding.

queue (Queue) is a common data structure. In the data structure of the queue, the first inserted element will be taken out first; otherwise the last inserted element will be taken out last, so the queue is also called “first in first out” (FIFO: First In First Out). Linear table.

One end of the element is called "the end of the team", and the end of the element is called "the head of the team". Message Queuing can handle data transfer and storage asynchronously, and when it is frequently and densely inserted into the back-end database, message queues can be used to process these data writes asynchronously.

MemcacheQ is an open source message queue service based on the Memcache protocol. Because it follows the Memcache protocol, the development cost is very low and can be easily mastered without learning additional knowledge.

MemcacheQ has also been applied in a recent project. Below I will share the compilation and installation process of MemcacheQ in Linux.

First, MemcacheQ relies on BerkeleyDB and Libevent. If Memcached has been installed on the server, Libevent should already exist. Otherwise, you need to download and install Libevent first.

The download link is as follows:

Libevent: https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz

Berkeley DB: http://download.oracle.com/otn/berkeley-db/db-6.0.30.tar.gz

MemcacheQ: https://github.com/stvchu/memcacheq

Install Libevent

tar zvxf libevent-2.0.21-stable.tar.gz

cd libevent-2.0.21-stable

. /configure --prefix=/usr/local/libevent

make && make install

echo “/usr/local/libevent/lib” 》 /etc/ld. So.conf

ldconfig

Installing BerkeleyDB

Introduction to BerkeleyDB: BerkeleyDB is an open source file database between relational and in-memory databases, usage and in-memory databases Similarly, it provides a series of functions that directly access the database, rather than requiring network communication, SQL parsing, etc., as in a relational database.

MemcacheQ relies on BerkleyDB for persistent storage of queued data so that queue data is not lost when MemcacheQ crashes or breaks unexpectedly.

tar zxvf db-6.0.30.tar.gz

cd db-6.0.30/build_unix

. . /dist/configure --prefix=/usr/local/berkeleydb

make && make install

ln -s /usr/local/berkeleydb/lib/libdb-6.0.so /usr/lib/

echo “/usr/local/berkeleydb/lib/” 》” /etc/ld.so.conf

ldconfig

Installing MemcacheQ

tar zxvf memcacheq-0.2.0.tar.gz

cd memcacheq-0.2.0

. /configure --prefix=/usr/local/memcacheq --with-bdb=/usr/local/berkeleydb --with-libevent=/usr/local/libevent --enable-threads

make & & make install
Previous12Next page Total 2 pages

Copyright © Windows knowledge All Rights Reserved