en:server:services:redis

This is an old revision of the document!


Redis

Redis is an open source (BSD licensed), in-memory data structure store used as a database, cache, message broker, and streaming engine. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions, and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

pacman -S redis
nano /etc/redis/redis.conf
port 0
unixsocket /run/redis/redis.sock
unixsocketperm 770
requirepass your-password
usermod -aG redis http
systemctl enable --now redis.service

If the error overcommit memory … occurs with systemctl status redis.service, add this to sysctl:

/etc/sysctl.d/99-sysctl.conf
vm.overcommit_memory=1

Enable redis for php.

pacman -S php-igbinary php-redis
nano /etc/php/php.ini
extension=igbinary.so
extension=redis
redis-cli -s /var/run/redis/redis.sock --askpass monitor
  • en/server/services/redis.1672536392.txt.gz
  • Last modified: 2023/01/01 01:26
  • by dan