CentOS6.4 安装SSDB

1、安装

wget --no-check-certificate https://github.com/ideawu/ssdb/archive/master.zip
unzip master
cd ssdb-master
make
make install

2、修改配置文件
vi /usr/local/ssdb/ssdb.conf
把server下的IP改为:0.0.0.0

3、设置SSDB为服务和开机启动

vi /etc/rc.d/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

exit 0

保存退出,然后设置权限
chmod 777 /etc/rc.d/init.d/ssdb   #赋予文件执行权限
chkconfig ssdb on   #设置开机启动
service ssdb start

 

你可能感兴趣的:(centos6.4)