Introduction and use of SSDB

 

1. Introduction to SSDB

Since Redis itself is mainly used as a memory cache and is not suitable for persistent storage, there are currently SSDB, ARDB, etc., as well as JIMDB such as JD.com, which all support the Redis protocol and can support direct access by Redis clients; and these persistent storages are large Most of them use persistence engines such as LevelDB, RocksDB, and LMDB to achieve persistent data storage; JD.com's JIMDB is mainly divided into two versions: LevelDB and LMDB, and the JD.com product details page we see uses LMDB engine as storage , which can realize massive KV storage; of course, SSDB is also used by some departments in Jingdong; in addition, beansDB, which has been researched like Douban, is also very good. The differences between these persistence engines can be found and learned by yourself.

 

2. SSDB installation and use

 

1. Download SSDB and install it

#First make sure g++ is installed, if not

Ubuntu can be installed using the following command apt-get install g++  

centOS6.6 yum -y install  g++

 

********************************************************

# cd /usr/local

# wget https://github.com/ideawu/ssdb/archive/1.8.0.tar.gz  

# tar -xvf 1.8.0.tar.gz  

make  

Note that the jar package will not be found when installing using the above method. I sampled the official installation, as follows: 

********************************************************

# cd /usr/local

# wget --no-check-certificate https://github.com/ideawu/ssdb/archive/master.zip

# unzip master

# cd ssdb-master

# make

# sudo make install

 

 

Error:

Unzip tool installation: yum -y install unzip

autoconf安装: ERROR! autoconf required! install autoconf first

yum -y install autoconf

 

2.启动:

# start master

./ssdb-server ssdb.conf

 

# or start as daemon

./ssdb-server -d ssdb.conf

 

 后台启动SSDB服务器

/usr/local/ssdb-master/ssdb-server /usr/local/ssdb-master/ssdb.conf &


3、查看是否启动成功   

ps -aux | grep ssdb  

 

4、进入客户端

 /usr/local/ssdb-master/tools/ssdb-cli -p  8888

因为SSDB支持Redis协议,所以用Redis客户端也可以访问 

redis-cli  -p 8888

 

 

5、执行如下命令

127.0.0.1:8888> set i 1  

OK  

127.0.0.1:8888> get i  

"1"  

 

安装过程中遇到错误请参考http://ssdb.io/docs/zh_cn/install.html;对于SSDB的配置请参考官方文档https://github.com/ideawu/ssdb。

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326266629&siteId=291194637