installation

Install Redis on Ubuntu 22.04|20.04|18.04

My Evironment: Ubuntu 20.10 (Groovy Gorilla))

Step 1: Install Redis

 1.Start by updating the package repository:

willhsu@ubuntu20:~$ sudo apt update
willhsu@ubuntu20:~$ sudo apt -y install redis-server
willhsu@ubuntu20:~$ sudo add-apt-repository ppa:redislabs/redis
willhsu@ubuntu20:~$ sudo apt-get update
willhsu@ubuntu20:~$ sudo apt-get install redis
willhsu@ubuntu20:~$ redis-server -v
Redis server v=6.2.6 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=557672d61c1e18ba
 2.Then, enable the service and start redis-server:

willhsu@ubuntu20:~$ sudo systemctl enable --now redis-server
 3.Test connection to Redis Server

willhsu@ubuntu20:~$ redis-cli ping
PONG