Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/vm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hansson <daniel@techandme.se>2017-05-22 17:40:16 +0300
committerGitHub <noreply@github.com>2017-05-22 17:40:16 +0300
commitf07a5dab89b7007e4574e4d6535dc05d6775e0b9 (patch)
treecf34a455e541eecd80a70a5a61963c8b6a6f0926 /nextcloud_install_production.sh
parent5ee95e0e7d965a748d3c085c59be381c6e7e794f (diff)
set OPcache for Nextcloud 12 (#225)
Diffstat (limited to 'nextcloud_install_production.sh')
-rw-r--r--nextcloud_install_production.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/nextcloud_install_production.sh b/nextcloud_install_production.sh
index 20c6e2de..1991b6c2 100644
--- a/nextcloud_install_production.sh
+++ b/nextcloud_install_production.sh
@@ -281,6 +281,19 @@ then
sed -i 's/ php_value memory_limit 512M/# php_value memory_limit 512M/g' "$NCPATH"/.htaccess
fi
+# Enable OPCache for PHP
+# https://docs.nextcloud.com/server/12/admin_manual/configuration_server/server_tuning.html#enable-php-opcache
+{
+echo "# OPcache settings for Nextcloud"
+echo "opcache.enable=On"
+echo "opcache.enable_cli=1"
+echo "opcache.interned_strings_buffer=8"
+echo "opcache.max_accelerated_files=10000"
+echo "opcache.memory_consumption=128"
+echo "opcache.save_comments=1"
+echo "opcache.revalidate_freq=1"
+} >> /etc/php/7.0/apache2/php.ini
+
# Install Figlet
apt install figlet -y