2021年9月7日星期二

nextcloud的内存缓存设置

 设置文档见https://docs.nextcloud.com/server/21/admin_manual/configuration_server/caching_configuration.html

sudo apt install php8.4-apcu

一定需要带版本号,这样是不行的(apt install php-apcu)

还需要安装:

sudo apt install redis-server
apt install php8.4-redis (一定需要带版本号)

sudo systemctl enable redis-server

sudo systemctl start redis-server

sudo nano /etc/php/8.4/fpm/php.ini 添加:

extension=redis.so

运行:sudo systemctl restart php8.4-fpm

检查是否加载成功: php -m | grep redis


在/var/www/nextcloud/config/config.php文件中加入一行

'memcache.local' => '\OC\Memcache\APCu',

在/etc/php/8.4/fpm/php.ini最后加入

apc.enable_cli=1

在/etc/php/7.4/mods-available/apcu.ini中加入

apc.enable_cli=1


没有评论:

发表评论

小型网站的ubuntu服务器如何提升连接数

 当服务器有多个api应用,或者网站的时候,会出现网页打不开。但是cpu、内存等都很空闲。这种情况,有可能是网站的文件数设置不正确。 查询服务器支持的TCP连接数: ulimit -n 默认是1024 需要增加方法: 编辑/etc/security/limits.conf * s...