Redis supports different operating system and Linux distributions. We will look how to install and start redis in Linux distributions Ubuntu, Debian, Fedora, CentOS and RedHat in this tutorial.
Install Fedora, CentOS, RedHat
We can install redis server on Fedora, CentOS and RedHat with the following yum
command.
$ yum install redis -y

Install Ubuntu, Debian
We can install redis server on Fedora, CentOS and RedHat with the following apt
command.
$ apt install redis-server

Redis Service Status
We can check redis service status with the systemctl status
command. The service name of redis in Fedora,CentOS and RedHat is redis
in Ubuntu and Debian redis-server
Fedora, CentOS, RedHat
$ systemctl status redis

Ubuntu, Debian
$ systemctl status redis-server
Start Service
We can start redis service with the systemctl start
command like below.
Fedora, CentOS, RedHat
$ systemctl status redis
Ubuntu, Debian
$ systemctl status redis-server
Check Redis Cli
By default redis service listen for port TCP 6379 . We can also connect to redis service with the redis-cli
tool. Following command will try to connect local redis service with IP address 127.0.0.1
$ redis-cli
