Introducción
Redis es una base de datos llave-valor en memoria que ofrece seguridad, velocidad y flexibilidad al momento de trabajar con este.
Prerrequisitos
- Ubuntu 18.04
- Acceso al sudo o usuario root
Instalación
Para instalar ejecutamos los siguientes comandos:
sudo apt update
sudo apt install redis-server
Configuración Básica
Cambiaremos la configuración inicial por seguridad. Agregamos la directiva "supervised" que por defecto está en no, para hacer el cambio editamos el archivo:
sudo vim /etc/redis/redis.conf
Y cambiamos la línea:
. . .
# If you run Redis from upstart or systemd, Redis can interact with your
# supervision tree. Options:
# supervised no - no supervision interaction
# supervised upstart - signal upstart by putting Redis into SIGSTOP mode
# supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET
# supervised auto - detect upstart or systemd method based on
# UPSTART_JOB or NOTIFY_SOCKET environment variables
# Note: these supervision methods only signal "process is ready."
# They do not enable continuous liveness pings back to your supervisor.
supervised systemd
. . .
Reiniciamos el servicio
sudo /etc/init.d/redis-server restart
Probar la Instalación
redis-cli
> ping
#Debe Responder
> PONG
Comentarios