til/redis.md

42 lines
439 B
Markdown
Raw Normal View History

2020-02-24 16:04:30 +00:00
# Redis
Assume you use Archlinux.
Read [Redis](https://wiki.archlinux.org/index.php/Redis).
2020-03-11 14:48:59 +00:00
Start service:
```sh
systemctl start redis.service
```
Otherwise use docker:
2020-02-24 16:04:30 +00:00
```sh
docker run -d -p 6379:6379 --name redis redis:alpine
```
## redis-cli
Connect:
```sh
redis-cli -h localhost -p 6379
```
### After connect
Get all keys:
```sh
KEYS *
```
Delete all keys:
```sh
FLUSHALL
```
Read [Commands](https://redis.io/commands).