Compiling and Installing RocksDB JNI
Compiling RocksDBjni 5.7.3
- Download the RocksDBjni 5.7.3 source code.
1wget https://codeload.github.com/facebook/rocksdb/zip/v5.7.3 - Decompress the source code package.
1 2
mv v5.7.3 rocksdbjni-5.7.3.zip unzip rocksdbjni-5.7.3.zip
- Go to the directory generated after the decompression.
1cd rocksdb-5.7.3
- In the Makefile file, change the value of DEBUG_LEVEL to 0.

- Change the Maven repository address in the java/Makefile file to https://repo1.maven.org/maven2/.
- Open the file.
1vi java/Makefile - Press i to enter the insert mode and set CENTRAL_REPO_URL? to https://repo1.maven.org/maven2/.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Compile the source code and package it into rocksdbjni-5.7.3-linux64.jar in the rocksdb-5.7.3/java/target directory.
1PORTABLE=1 make rocksdbjava -j8
Compiling RocksDBjni 5.14.2
- Download the RocksDBjni 5.14.2 source code.
1wget https://codeload.github.com/facebook/rocksdb/zip/v5.14.2 - Decompress the source code package.
1 2
mv v5.14.2 rocksdbjni-5.14.2.zip unzip rocksdbjni-5.14.2.zip
- Go to the directory generated after the decompression.
1cd rocksdb-5.14.2
- In the Makefile file, change the value of DEBUG_LEVEL to 0.

- Change the Maven repository address in the java/Makefile file to https://repo1.maven.org/maven2/.
- Open the file.
1vi java/Makefile
- Press i to enter the insert mode and set CENTRAL_REPO_URL? to https://repo1.maven.org/maven2/.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Compile the source code and package rocksdbjni-5.14.2-linux64.jar to the rocksdb-5.14.2/java/target directory.
1PORTABLE=1 make rocksdbjava -j8
Compiling RocksDBjni 5.15.10
- Download the RocksDBjni 5.15.10 source code.
1wget https://codeload.github.com/facebook/rocksdb/zip/v5.15.10 - Decompress the source code package.
1 2
mv v5.15.10 rocksdbjni-5.15.10.zip unzip rocksdbjni-5.15.102.zip
- Go to the directory generated after the decompression.
1cd rocksdb-5.15.10
- In the Makefile file, change the value of DEBUG_LEVEL to 0.

- Change the Maven repository address in the java/Makefile file to https://repo1.maven.org/maven2/.
- Open the file.
1vi java/Makefile
- Press i to enter the insert mode and set CENTRAL_REPO_URL? to https://repo1.maven.org/maven2/.
- Press Esc.
- Open the file.
- Compile the source code and package rocksdbjni-5.15.10-linux64.jar to the rocksdb-5.15.10/java/target directory.
1PORTABLE=1 make rocksdbjava -j8
Parent topic: RocksDBjni Porting Guide (CentOS&openEuler)