CentOS 6.5 配置 SSDB 1.8.0

环境说明:
OS:CentOS 6.5  (阿里云ECS)

相关链接:
1.SSDB 下载配置:http://ssdb.io/docs/install.html
2.SSDB 入门文档:http://ssdb.io/ssdb-get-started.pdf

安装:

wget --no-check-certificate https://github.com/ideawu/ssdb/archive/master.zip
unzip master
cd ssdb-master
make
# 将安装在 /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.conf
echo "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.conf
echo "ssdb started."
        ;;
    *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
    ;;
esac

2.给予此文件权限:

chmod a+wrx /etc/init.d/ssdb3.$ service ssdb start 就可以启动ssdb了
打印出ssdb 1.8.0
Copyright (c) 2012-2014 ssdb.io

ssdb started.
则证明启动成功。启动SSDB 命令行客户端(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.0

ssdb 127.0.0.1:8888>

则启动成功。

相关推荐