Redis Install Ubuntu

install

curl -O http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
cd redis-stable
make
make test
sudo make install

config

sudo mkdir /etc/redis
sudo cp redis-stable/redis.conf /etc/redis
sudo adduser --system --group --no-create-home redis
sudo mkdir /var/lib/redis
sudo chown redis:redis /var/lib/redis
sudo chmod 770 /var/lib/redis

/etc/redis/redis.conf

supervised systemd
dir /var/lib/redis
# bind localhost

start

redis-server /etc/redis/redis.conf

shutdown

redis-cli shutdown

redis-cli
127.0.0.1:6379> shutdown

run in docker

docker run --name redis -network host -v /var/lib/redis:/data  /etc/redis/redis.conf:/etc/redis/redis.conf -d redis:5.0-alpine3.9  redis-server /etc/redis/redis.conf --appendonly yes

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04

Related