SSDB download and installation


Strongly recommend that you deploy SSDB on the Linux operating system.

Do not use it in a production environment Use Windows operating system to run the SSDB server. If you really must use Windows operating system, please run a Linux virtual machine on it, and then let SSDB run in this virtual machine.

Compilation and installation

wget --no-check-certificate https://github.com/ideawu/ssdb/archive/master.zipunzip master
cd ssdb-master
make将安装在 /usr/local/ssdb 目录下sudo make install

Problem solving

If the following error occurs:

g++ ...deps/snappy-1.1.0/.libs/libsnappy.a: No such file or directory
make[1]:  [all] Error 1

or

g++ ...deps/jemalloc-3.3.1/lib/libjemalloc.a: No such file or directory
make[1]:  [all] Error 1

This is because Snappy or Jemalloc did not compile successfully , this is usually because there is a problem with your system clock. It can be solved like this:

cd deps/snappy-1.1.0;
./configure
make

or

cd deps/jemalloc-3.3.1;
./configure
make

Start and stop

# 启动主库, 此命令会阻塞住命令行./ssdb-server ssdb.conf或者启动为后台进程(不阻塞命令行)./ssdb-server -d ssdb.conf启动 ssdb 命令行./tools/ssdb-cli -p 8888停止 ssdb-server./ssdb-server ssdb.conf -s stop对于旧版本kill cat ./var/ssdb.pid

So far, you need to manage it manually ssdb-server Processes, if you wish to automatically manage them when the operating system starts and stops, please follow the instructions below.

SSDB startup script (self-started with the operating system)

Assuming that you have installed SSDB in the default /usr/local/ssdb directory, put tools/ssdb.sh Place the script in the /etc/init.d directory.

Note: For CentOS users, please rename ssdb.sh to ssdb .

Edit the following content:

# each config file for one instanceconfigs=/data/ssdb_data/test/ssdb.conf

Change /data/ssdb_data/test/ssdb.conf to the path of your SSDB configuration file. If you have multiple SSDB instances, Then write them on one line, separated by spaces, for example:

# each config file for one instanceconfigs=/data/ssdb_data/test/ssdb.conf /data/ssdb_data/demo/ssdb.conf

CentOS

sudo chkconfig --add ssdb
sudo chkconfig ssdb on

Ubuntu

TODO: