Installing Redis on Debian 9

Redis is an in-memory key-value store known for its flexibility, performance, and wide language support.

Installation is very easy considering that it is provided by apt:

# apt install redis-server

After installation Redis will be running as a service. You can use these commands to check the status, or start and stop:

# service redis status
# service redis start
# service redis stop

Or the systemctl version:

# systemctl status redis
# systemctl start redis
# systemctl stop redis

TESTING YOUR INSTALLATION

Using the command “redis-cli” you get a command line prompt. The following commands will show you the basic functionality of your Redis server:

# redis-cli
127.0.0.1:6379> ping
PONG
127.0.0.1:6379> set test "Is it working?"
OK
127.0.0.1:6379> get test
"Is it working?"
127.0.0.1:6379> exit
#