How do I install a Memcache on FreeBSD?

Nextcloud version: 24.0.0
Operating system and version: FreeBSD 13.0
Apache version: Apache 2.4.53
PHP version: PHP 8.0
Redis version: 7.0

The issue you are facing:

I cannot enable any kind of Memcache. I’ve tried following various guides, but most are for Linux or are terribly outdated. I’ve installed Redis, but there doesn’t appear to be a PHP module in ports to allow Nextcloud to connect to Redis. Is that needed?

I tried installing a memcache ages ago, but gave up. I’m determined to get it working this time.

Can I just use Redis? Or do I also need APCu as well? I’m using ports, so I can recompile with various options enabled/disabled if needed.

To be perfectly honest, I don’t fully understand how the memcache works or how to make it available to Nextcloud/Apache! Can somebody please provide a brief overview of the structure (what connects to what) and what components I’ll need?

I haven’t provided a log since… I’m not sure it applies here? Though I’m happy to provide anything people think is relevant.

I tried adding the following to my config.php, but without success:

  'redis' =>
  array (
    'host' => '/tmp/redis.sock',
    'port' => '0',
    'dbindex' => '0',
    'password' => 'secret',
    'timeout' => '1.5',

I added the above using the command line.
(e.g. su -m www -c "php ./occ config:system:set redis host --value=/tmp/redis.sock" and so on.)

Thanks for any advice!

With the package manager pkg, I find: php74-pecl-redis-5.3.5 and it’s also available for newer php versions and with ports:

I use apcu as well. I think it was in the documentation that for local (not distributed) setups, redis+apcu is recommended.

facepalm PECL, of course!

I was searching for something explicitly labelled with “php”. I completely missed the /usr/ports/databases/pecl-redis port.

Thanks for that, I’ll have another go shortly and see if that addition solves my issue. I’ll post an update when done…

Hi there, did you have any luck with this? I’m looking to do the same.

Thank you!

Sorry, I haven’t had a chance yet. (I’m actually going through chemotherapy and have had an off week.)

But I’m still planning on getting memcache working and posting how I made it work or how I failed! Either way, I’m planning on working on it before Monday (when I’m hooked up to the IV again…)