feat: add Redis setup

This commit is contained in:
dancingCycle 2022-03-16 14:19:34 +01:00
parent efca48ef1d
commit 15067eed96
2 changed files with 64 additions and 0 deletions

59
doc/redis.md Normal file
View File

@ -0,0 +1,59 @@
# Setup Redis
* update apt repository cache
```
sudo apt update
```
* install redis
```
sudo apt install redis-server --no-install-recommends
```
* check if service is running
```
systemctl status redis-server
```
* verify used port
```
ss -tlpn
```
* create backup of default configuration
```
sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.bak
```
* open config file
```
sudo vi /etc/redis/redis.conf
```
* increase the memory of the server by adding these two lines in the end of the configuration file
```
maxmemory 500mb
maxmemory-policy allkeys-lru
```
* apply config changes
```
sudo systemctl restart redis-server
```
* test service sending ```ping``` using the client
```
redis-cli
```
# Other
* start service
```
sudo systemctl start redis-server
```
* enable service to start with the system
```
sudo systemctl enable redis-server
```

5
doc/redis.md.license Normal file
View File

@ -0,0 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 Software Ingenieur Begerad <swingbe.de>
*
* SPDX-License-Identifier: CC0-1.0
*/