News
Seven days of Black Friday madness — great deal from Serverspace!

THE NEW YEAR
WHEEL OF FORTUNE

Spin the wheel and win a guaranteed prize right now!

By registering, you are signing up to receiving emails.
DF
September 12 2023
Updated September 12 2023

Installing LevelDB on CentOS

CentOS

 

photo_2023-09-11_22-38-50

LevelDB — is high-performance NoSQL database for
storaging data in key/value format developed by Google.

Requirements

  • CentOS 5/6/7;
  • Python 2.7 or newier;
  • gcc-c++;
  • Snappy.

Installing LevelDB

Let's install archiver utility:

yum install leveldb snappy

Using this command, we installed LevelDB, now let's test its perfomance. For this we need Python-pip.

Installing Python-pip:

yum --enablerepo=extras install epel-release
yum install python-devel python-pip gcc-c++

Let's install interface for interacting withLevelDB:

pip install leveldb-cli

Now let's test it. Create a new database:

leveldb create -d newdb.db

Let's insert the key named 'hello' with value 'world' into it:

leveldb put hello centos -d newdb.db

Let's get the value 'hello':

leveldb get hello -d newdb.db

Output:
centos

Let's delete the key 'hello':

leveldb delete hello -d newdb.db

Let's try to get the key 'hello':

leveldb get hello -d newdb.db

Output:
Error: key hello does not exist

In general, it should look like this:

Screenshot № 1. Interface for interacting with LevelDB
Screenshot № 1. Interface for interacting with LevelDB
Vote:
5 out of 5
Аverage rating : 5
Rated by: 1
1101 CT Amsterdam The Netherlands, Herikerbergweg 292
+31 20 262-58-98
700 300
ITGLOBAL.COM NL
700 300

You might also like...

We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.