Redis - HVboom/HowTo-DigitalOcean GitHub Wiki
Description
Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
You can run atomic operations on these types, like appending to a string; incrementing the value in a hash; pushing to a list; computing set intersection, union and difference; or getting the member with highest ranking in a sorted set.
In order to achieve its outstanding performance, Redis works with an in-memory dataset. Depending on your use case, you can persist it either by dumping the dataset to disk every once in a while, or by appending each command to a log.
Redis also supports trivial-to-setup master-slave replication, with very fast non-blocking first synchronization, auto-reconnection on net split and so forth.
:speech_balloon: copied from package description
Setup Redis
-
Install as normal package
sudo pkg install redis
-
Amend configuration /usr/local/etc/redis.conf:
-
Disable TCP listening by setting:
port 0
-
Enable listening on sockets:
unixsocket /var/run/redis/redis.sock # Grant permission to the socket to all members of the redis group unixsocketperm 770
-
-
Enable service on startup:
sudo sysrc redis_enable=yes
-
Start service:
sudo service redis restart