Redis: Difference between revisions

From The Brainwrecked Wiki
Jump to navigation Jump to search
Added "Utilized By" Section and re-vamped description
m Configuration: Added gitea to users to add to the redis group
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<div style="float:left; margin-right:0.5em; margin-bottom:0.5em;">__TOC__</div>
<div style="float:right; margin-left:0.5em; margin-bottom:0.5em;">__TOC__</div>


Redis ('''RE'''mote '''DI'''ctionary '''S'''erver) is an in-memory key-value database for abstract data structures, such as strings, lists, maps, sets, sorted sets, HyperLogLogs, bitmaps, streams, and spatial indexes.
Redis ('''RE'''mote '''DI'''ctionary '''S'''erver) is an in-memory key-value database for abstract data structures, such as strings, lists, maps, sets, sorted sets, HyperLogLogs, bitmaps, streams, and spatial indexes.
Line 46: Line 46:
You will also need to add users to the {{ic|redis}} group so processes can access {{ic|redis}}
You will also need to add users to the {{ic|redis}} group so processes can access {{ic|redis}}


{{bc|for username in http rspamd; do sudo usermod -G redis ${username}; done}}
{{bc|for username in gitea http rspamd; do sudo usermod -G redis ${username}; done}}

Latest revision as of 18:52, 26 December 2019

Redis (REmote DIctionary Server) is an in-memory key-value database for abstract data structures, such as strings, lists, maps, sets, sorted sets, HyperLogLogs, bitmaps, streams, and spatial indexes.

Prerequisites

None

Utilized By

Gitea (optional)
Nextcloud (optional)
OnlyOffice Document Server (binary version)
PHP-Redis
Allows PHP applications to use Redis
Rspamd (optional)
WordPress (optional, requires plugin)

Required Packages

sudo pacman -Syu redis

Optional Packages

This will give PHP applications (like Nextcloud and WordPress) access to the Redis server.

sudo pacman -Syu php-redis

Configuration

By default, redis is already configured to bind to 127.0.0.1:6379, but the Unix socket is not enabled.

/etc/redis.conf
...
# Unix socket.
#
# Specify the path for the Unix socket that will be used to listen for
# incoming connections. There is no default, so Redis will not listen
# on a unix socket when not specified.
#
unixsocket /run/redis/redis.sock
unixsocketperm 700
...

You will also need to add users to the redis group so processes can access redis

for username in gitea http rspamd; do sudo usermod -G redis ${username}; done