-
Notifications
You must be signed in to change notification settings - Fork 33
/
INSTALL
executable file
·71 lines (47 loc) · 1.62 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Dependencies
============
Before deploying MemcacheQ, make sure that following packages have been installed:
Berkeley DB 4.7 or later
-------------------------
Download from <http://www.oracle.com/database/berkeley-db/db/index.html>
How to install BerkekeyDB::
$tar xvzf db-4.7.25.tar.gz
$cd db-4.7.25/
$cd build_unix/
$../dist/configure
$make
$sudo make install
libevent 1.4.x or later
-----------------------
Download from <http://monkey.org/~provos/libevent/>
How to install libevent::
$tar xvzf libevent-1.4.x-stable.tar.gz
$cd libevent-1.4.x-stable
$./configure
$make
$sudo make install
On a linux, load .so file by add two line in /etc/ld.so.conf::
/usr/local/lib
/usr/local/BerkeleyDB.4.7/lib
Then, run 'ldconfig'.
Building MemcacheQ
==================
On a \*nix, just following::
$tar xvzf memcacheq-0.2.x.tar.gz
$cd memcacheq-0.2.x
$./configure --enable-threads
$make
$sudo make install
Start the daemon
================
For example::
memcacheq -d -r -H /data1/memcacheq -N -R -v -L 1024 -B 1024 > /data1/mq_error.log 2>&1
Stop the daemon
===============
It is safe to call 'kill <pid>' directly to stop the daemon. But be careful with kill -9.
Notice
=======
Because MemcacheQ is using fixed-length storage, so you should use '-B' option to specify the max length of your message. Default is 1024 bytes. Any message that shorter than the length you specified will be padded with '0x20', the space character. A message includes following bytes::
<your queue name bytes> + <message metadata(9 ~ 20+ bytes)> + <your message body bytes>
Use "-h" option to see more configures.
Have fun :)