Installing Redis on Ubuntu OS

Author: Al-mamun Sarkar Date: 2020-09-17 14:04:22

In this lesson, I will show you how to install the Redis server on an ubuntu computer. 

 

Refresh ubuntu local package repository:

sudo apt-get update

The easiest way for installing Redis on ubuntu but you can miss the latest version:

sudo apt-get install redis-server

 

Installing the Latest version:

Install build-essential and tcl package for building and testing binary:

sudo apt-get install build-essential tcl

Make and redis folder and enter into the redis folder:

mkdir redis && cd redis

Download the latest version of redis form redis.io/download:

wget http://download.redis.io/releases/redis-6.0.8.tar.gz

Unzip the redis-6.0.8tar.gz file and to the redis folder:

tar xzf redis-6.0.8.tar.gz
cd redis-6.0.8

Make Redis binary using make command:

make

Test the binary:

make test

Installing Redis:

sudo make install

 

 

Running Redis server:

Runs the redis-server command on the terminal.

redis-server

 

Running client:

Runs the redis-cli command on the terminal.

redis-cli

 

Test Redis:

Write ping on Redis shell and you get PONG if everything is okay:

ping
set name "Mamun"
get name