Forum Navigation
Please to create posts and topics.

Hot to enable redis memcache (Nextcloud)

How to install, easily, redis server on an Ubuntu 16.04 (Xenial) server and enable it for Nextcloud, sia per memcache.local che per memcache.locking?

If your server runs Ubuntu 16.04 LTS you can install the REDIS Server easily using "apt-get install". Only very few configuration settings are required to set it up for your Nextcloud.

Start the installtion with:

sudo -s apt install redis-server php-redis

Afterwards edit the configuration file:

vi /etc/redis/redis.conf

And change the default port to 0:

# port 6379
port 0

And the following two unix socket entries:

unixsocket /var/run/redis/redis.sock
unixsocketperm 770

Save and exit the file (using vi: "wq!") and grant your php-user the access rights required:

usermod -a -G redis www-data

Now, start the redis server:

service redis-server start

And with the following command...

ls -la /run/redis

...check for the existance of the following files related to redis-server process:

If you fail to find the files rght away restart your server or Raspberry Pi, or just redis-server (restart) and check again.

At last modify the Nextcloud config (config.php) file with:

sudo -u www-data vi /var/www/nextcloud/config/config.php

by adding the following lines:

'memcache.local' => '\OC\Memcache\APCu',
'filelocking.enabled' => 'true',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis.sock',
'port' => 0,
'timeout' => 0.0,