环境说明:
OS:CentOS 6.5 (阿里云ECS)
相关链接:
1.SSDB 下载配置:
2.SSDB 入门文档:
安装:
wget --no-check-certificate https://github.com/ideawu/ssdb/archive/master.zipunzip mastercd ssdb-mastermake# 将安装在 /usr/local/ssdb 文件夹下sudo make install
开机启动 注冊成服务:
1.在 /etc/init.d 文件夹下新建文件ssdb 内容例如以下:
#!/bin/sh # chkconfig:345 98 98 # description: SSDB is a fast NoSQL database for storing big list of billions of elements # processname:ssdb case "$1" in 'start') /usr/local/ssdb/ssdb-server -d /usr/local/ssdb/ssdb.confecho "ssdb started.";; 'stop')kill `cat /usr/local/ssdb/var/ssdb.pid`echo "ssdb stopped.";; 'restart')kill `cat /usr/local/ssdb/var/ssdb.pid`echo "ssdb stopped."sleep 0.5/usr/local/ssdb/ssdb-server -d /usr/local/ssdb/ssdb.confecho "ssdb started." ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac
2.给予此文件权限:chmod a+wrx /etc/init.d/ssdb
3.$ service ssdb start 就能够启动ssdb了
打印出
ssdb 1.8.0Copyright (c) 2012-2014 ssdb.iossdb started.
则证明启动成功。
启动SSDB 命令行client(ssdb-cli)
$ /usr/local/ssdb/ssdb-cli -h 127.0.0.1 -p 8888
打印出
ssdb (cli) - ssdb command line tool.Copyright (c) 2012-2014 ssdb.io'h' or 'help' for help, 'q' to quit.server version: 1.8.0ssdb 127.0.0.1:8888>
则启动成功