Setting up the Redis server in your local machine
Redis stands for remote dictionary server. Simply we can describe it as s a key value store.This key-value store can be used as a database to read and write data as key-value.
Step 1
Download the Redis server . (In this article I used Ubuntu operation system)
We need to install two packages.
- Build essential package (Used to compilers our binaries)
- TCL package (Used to test our binaries)
Execute following commands in your terminal.
$ sudo apt-get update
$ sudo apt-get install build-essential tcl
Download, extract and compile Redis with:
$ wget http://download.redis.io/releases/redis-6.0.5.tar.gz
$ tar xzf redis-6.0.5.tar.gz
$ cd redis-6.0.5
$ make
After press enter you van see the Redis server version.
apt-cache policy redis-server
Step 2
After setting up the Redis Server, navigate to the location you installed Redis and execute the sudo make install command.
Step 3
Enter redis-server command to start the Redis server.
Step 4
In the command line, you can see the Redis port and PID as shown below. Now your redis-server is started.
Step 5
You can interact with Redis using the built-in client. In the command line, navigate to the location you installed Redis. Enter redis-cli
.
Done !!! You can store key values pairs in the redis server.
Reference