How to install Redis-Server 6.0.1 in Ubuntu 20.04?

Solution 1:

From the redis-server page:

Download, extract and compile Redis with (you have of course to install via apt the build-essential and wget packages):

wget http://download.redis.io/releases/redis-6.0.3.tar.gz
tar xzf redis-6.0.3.tar.gz
cd redis-6.0.3
make

The binaries that are now compiled are available in the src directory. Run Redis with:

src/redis-server

You can interact with Redis using the built-in client:

$ src/redis-cli
redis> set foo bar
OK
redis> get foo
"bar"

Solution 2:

for redis version 6.2.x, the instruction from redis download page https://redis.io/download section From the official Ubuntu PPA

$ sudo add-apt-repository ppa:redislabs/redis
$ sudo apt-get update
$ sudo apt-get install redis

I believe the PPA is maintained by redis team.