8

RocksDB is a key / value database created by facebook and works very well, but it lacks documentation on how to install the production version.

Helmut Kemper
  • 662
  • 1
  • 6
  • 15

3 Answers3

15

The code below works fine on Ubuntu 16.04 and was placed here to help

git clone https://github.com/facebook/rocksdb.git
cd rocksdb

DEBUG_LEVEL=0 make shared_lib install-shared

export LD_LIBRARY_PATH=/usr/local/lib

Hope this helps.

Kemper

Helmut Kemper
  • 662
  • 1
  • 6
  • 15
  • 4
    In later versions you may need to `USE_RTTI=1` to get the functionality which relies on RTTI e.g. virtual functions from e.g. `WriteBatch::Handler`s. – midor Dec 27 '17 at 13:45
  • > DEBUG_LEVEL=0 make shared_lib install-shared Do I put it in some flle or run in terminal? – Volatil3 Oct 03 '22 at 09:11
13
sudo apt-get install librocksdb-dev
Peter Ludemann
  • 985
  • 6
  • 8
4

I was going through the same thing but I found answer, installation instructions are in fact there, just need to snoop around a little

https://github.com/facebook/rocksdb/blob/master/INSTALL.md

to wrap these instructions in few lines:

Dependencies:

sudo apt-get install libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev libzstd-dev

Installation:

git clone https://github.com/facebook/rocksdb.git
cd rocksdb/
make all
Furqan Siddiqui
  • 401
  • 3
  • 7
  • 3
    what is the next?, it builds librocksdb.a, RocksDB static library, how to run it.. – Ricc Oct 03 '18 at 04:26
  • 4
    `rocksdb/INSTALL.md`: "**Important:** If you plan to run RocksDB in production, don't compile using default `make` or `make all`. That will compile RocksDB in debug mode, which is much slower than release mode." – c z Nov 15 '18 at 11:26
  • 1
    I am also trying to know what to do after librocksdb.a has been created. Did anyone found the answer? I want to create a table in rocksdb, but not finding right steps to do that anywhere. – user3339691 Nov 19 '19 at 18:47
  • @user3339691 As I understand it, RocksDB is an embeddable key-value pair db, so we will have to write code to create a database and store data. – Arundale Ramanathan Sep 17 '22 at 09:37