Edit /etc/redis6/redis6.conf
:
- comment out the bind
directive
- flip protected-mode yes
to protected-mode no
sudo systemctl restart redis6
denying external connection attempts.
/etc/redis6/redis6.conf
redis6-cli -h 172.31.7.39
/var/log/redis6/redis6.log
/var/lib/redis6/dump.rdb
brew install redis
redis-server
sudo dfn install -y redis6
sudo systemctl enable redis6
sudo systemctl start redis6
Either ctrl-c the redis server process, or
redis-cli
> shutdown
sudo systemctl stop redis6
redis-cli
> slowlog get 10
Start the redis client with:
redis-cli monitor
redis6-cli monitor
or
telnet localhost 6379
> MONITOR
Use the first option.
> help <tab>
> help @set
Don’t do this in production
KEYS my:prefix:*
lpush mylist "foo1" "foo2" "foo3"
lrange mylist 0 -1
lpush mylist "a" "b"
brpoplpush mylist processinglist 0
lrange processinglist 0 -1
# => "a"
lrange mylist 0 -1
# => "b"
del mylist
Careful with this one.
for key in `echo 'KEYS <my-namespace>:*' | redis-cli | awk '{print $1}'`; do echo DEL $key; done | redis-cli
Or wipe everything out. Be even more careful with this one:
$ redis-cli
> shutdown
> exit
$ locate dump.rdb
$ rm <location>