2014-01-13 19:52:22 +01:00
|
|
|
Installing
|
2018-02-09 06:37:09 +01:00
|
|
|
==========
|
2014-01-13 19:52:22 +01:00
|
|
|
.. highlight:: bash
|
|
|
|
|
2018-02-09 06:37:09 +01:00
|
|
|
With distro package and pypi
|
|
|
|
****************************
|
|
|
|
|
|
|
|
This requires librocksdb-dev>=5.0
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
apt-get install python-virtualenv python-dev librocksdb-dev
|
|
|
|
virtualenv venv
|
|
|
|
source venv/bin/activate
|
2018-02-20 20:19:17 +01:00
|
|
|
pip install python-rocksdb
|
2018-02-09 06:37:09 +01:00
|
|
|
|
|
|
|
From source
|
|
|
|
***********
|
|
|
|
|
2014-01-13 19:52:22 +01:00
|
|
|
Building rocksdb
|
|
|
|
----------------
|
|
|
|
|
2015-08-17 10:43:04 +02:00
|
|
|
Briefly describes how to build rocksdb under an ordinary debian/ubuntu.
|
|
|
|
For more details consider https://github.com/facebook/rocksdb/blob/master/INSTALL.md
|
2014-01-13 19:52:22 +01:00
|
|
|
|
2015-08-17 10:43:04 +02:00
|
|
|
.. code-block:: bash
|
|
|
|
|
2017-04-16 18:57:09 +02:00
|
|
|
apt-get install build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev
|
2015-08-17 10:43:04 +02:00
|
|
|
git clone https://github.com/facebook/rocksdb.git
|
|
|
|
cd rocksdb
|
2017-09-21 10:50:25 +02:00
|
|
|
mkdir build && cd build
|
2017-04-16 18:57:09 +02:00
|
|
|
cmake ..
|
2017-09-21 10:50:25 +02:00
|
|
|
make
|
2015-08-17 10:43:04 +02:00
|
|
|
|
|
|
|
Systemwide rocksdb
|
|
|
|
^^^^^^^^^^^^^^^^^^
|
|
|
|
The following command installs the shared library in ``/usr/lib/`` and the
|
|
|
|
header files in ``/usr/include/rocksdb/``::
|
|
|
|
|
|
|
|
make install-shared INSTALL_PATH=/usr
|
|
|
|
|
|
|
|
To uninstall use::
|
|
|
|
|
|
|
|
make uninstall INSTALL_PATH=/usr
|
|
|
|
|
|
|
|
Local rocksdb
|
|
|
|
^^^^^^^^^^^^^
|
|
|
|
If you don't like the system wide installation, or you don't have the
|
|
|
|
permissions, it is possible to set the following environment variables.
|
|
|
|
These varialbes are picked up by the compiler, linker and loader
|
|
|
|
|
|
|
|
.. code-block:: bash
|
2014-01-13 19:52:22 +01:00
|
|
|
|
2017-04-25 13:36:01 +02:00
|
|
|
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:`pwd`/../include
|
2015-08-17 10:43:04 +02:00
|
|
|
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:`pwd`
|
|
|
|
export LIBRARY_PATH=${LIBRARY_PATH}:`pwd`
|
2014-01-13 19:52:22 +01:00
|
|
|
|
2017-04-23 13:32:41 +02:00
|
|
|
Building python-rocksdb
|
2018-02-09 06:37:09 +01:00
|
|
|
-----------------------
|
2014-01-13 19:52:22 +01:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2015-08-17 10:43:04 +02:00
|
|
|
apt-get install python-virtualenv python-dev
|
2018-02-09 06:37:09 +01:00
|
|
|
virtualenv venv
|
|
|
|
source venv/bin/activate
|
|
|
|
pip install git+git://github.com/twmht/python-rocksdb.git#egg=python-rocksdb
|