-
Notifications
You must be signed in to change notification settings - Fork 71
构建&快速开始
lijingcheng edited this page Dec 21, 2017
·
1 revision
Cmake >= 2.8.11
GCC >= 4.8
git clone https://github.com/JRHZRD/swapdb.git --recursive
(说明:如果在前面获取源码的时候带上了'--recursive'选项,则可以跳过这一步)
git submodule update --init --recursive
cmake . && make -j8
通过源码目录utils下提供的部署脚本,可以快速启动一个swapdb实例,包含一个swap-redis和一个swap-ssdb进程,对应的进程名为redis-server和ssdb-server
cd utils
# this will use the default "6379" port for swap-redis and "26379" port for swap-ssdb.
./deploy_redis.sh
# or you can specify a specific port like this, for example, use "6380" port
# ./deploy_redis.sh 6380
redis-cli -p 6379
127.0.0.1:6379> set a b
OK
127.0.0.1:6379> locatekey a
"redis"
127.0.0.1:6379> storetossdb a
OK
127.0.0.1:6379> locatekey a
"ssdb"
127.0.0.1:6379> get a
"b"
127.0.0.1:6379> dumpfromssdb a
OK
127.0.0.1:6379> locatekey a
"redis"