Chinaunix首页 | 论坛 | 博客
  • 博客访问: 143605
  • 博文数量: 22
  • 博客积分: 1050
  • 博客等级: 少尉
  • 技术积分: 260
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-14 16:41
文章分类

全部博文(22)

文章存档

2009年(5)

2008年(17)

我的朋友

分类: 数据库开发技术

2008-08-01 00:07:56

今天公司用到memcachedb,上网google了下,资料还较多,不过在下载版本时遇到版本不一致的问题,参考官方的install说明,OK!先把官方的INSTALL贴出来。

软件版本:db-4.6.21.tar.gz
        libevent-1.3e.tar.gz
        memcachedb-1.0.3.tar.gz

Dependencies
============
Before deploying Memcachedb, make sure that following packages installed:

Berkeley DB 4.6 or later
-------------------------


How to install BerkekeyDB:

$tar xvzf db-4.6.21.tar.gz
$cd db-4.6.21/
$cd build_unix/
$../dist/configure
$make
$sudo make install


libevent 1.3e or later
-------------------------
~provos/libevent/

How to install libevent:

$tar xvzf libevent-1.3e.tar.gz
$cd libevent-1.3e
$./configure
$make
$sudo make install

Load .so file by add two line in /etc/ld.so.conf:
$vi /etc/ld.so.conf

/usr/local/lib
/usr/local/BerkeleyDB.4.6/lib

Then, run 'ldconfig'.
$ ldconfig

Installation
============
$tar xvzf memcachedb-1.0.3.tar.gz
$cd memcachedb-1.0.3.tar.gz
#####修改默认缓存 vi memcachedb.c 里将settings.item_buf_size 由1024改成51200;
$./configure
$make
$sudo make install

Getting Started
===============

use "-h" option to get started.

Running Examples:

1. run as a single daemon

memcachedb -p21201 -d -r -u root -H ./env -N -v

2. run as a replicated group (i do this.)

start a master (read&write):

memcachedb -p21201 -d -r -u root -H ./env1 -N -R 127.0.0.1:31201 -M

then, start a replcas (read-only):

memcachedb -p21202 -d -r -u root -H ./env2 -N -R 127.0.0.1:31202 -O 127.0.0.1:31201 -S

Have fun :)

阅读(1431) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~