Commit 5628a62b authored by pedrolab's avatar pedrolab

nextcloud: fix phpmem and add memcache

parent ab0bf7cc
......@@ -37,7 +37,7 @@ compatible providers with all: huawei, zte
- ONT ZTE F601 (used by jazztel in the early FTTH days).
- guide (spanish): https://www.youtube.com/playlist?list=PLSvxAUzJ-XSfhk07w737c5p403a6U_WPc
- huawei hg8240 (used by movistar)
- huawei hg8240 / huawei hg8240h (used by movistar)
- [how to access via web](http://movistarencuestafibra.blogspot.com/p/ont-hg.html) - telecomadmin/admintelecom 192.168.100.1).
- telnet access u: root p: admin
- decode config file (linux and windows) https://zedt.eu/tech/hardware/obtaining-administrator-access-huawei-hg8247h/
......
......@@ -108,6 +108,10 @@ add in `/etc/php/7.0/apache2/php.ini`:
opcache.save_comments=1
opcache.revalidate_freq=1
replace `memory_limit` in `/etc/php/7.0/apache2/php.ini` to be:
memory_limit = 512M
[optional] in case you want to have data in different disk/storage:
mkdir -p /media/data/nextcloud
......@@ -255,3 +259,42 @@ force the usage of overlay2 (src https://docs.docker.com/storage/storagedriver/o
"storage-driver": "overlay2"
}
```
## install memcached
install APCu:
apt install memcached php-apcu redis-server php-redis
[redis is significantly faster as a unix socket](https://guides.wp-bullet.com/how-to-configure-redis-to-use-unix-socket-speed-boost/), in `/etc/redis/redis.conf` put:
unixsocket /var/run/redis/redis.sock
unixsocketperm 775
add www-data to redis group and restart apache2 to have proper permissions
gpasswd -a www-data redis
service apache2 restart
configure APCU as memcache and redis for file locking, in `/var/www/html/nextcloud/config/config.php` add:
'memcache.local' => '\OC\Memcache\APCu',
'memcache.distributed' => '\OC\Memcache\Redis',
'redis' => [
'host' => '/var/run/redis/redis.sock',
'port' => 0,
'dbindex' => 0,
'timeout' => 1.5,
],
https://docs.nextcloud.com/server/15/admin_manual/configuration_server/caching_configuration.html
## run occ operations
go to the appropriate directory
cd /var/www/html/nextcloud
run your occ operation, for example:
su www-data -s /bin/sh -c "php occ upgrade"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment