Memcaching boosts the performance of OwnCloud dramatically. Read about this here. My server is running Ubuntu 12.04 LTS. PHP 5.6 and 7.0 is handled by Plesk. In my experience 5.6 is the most stable running with OwnCloud. APCU is supported by OwnCloud but was not present as a module in PHP (Only on the Sytem providing PHP 5.4). So here’s how you install it.
This is a follow up to my previous post on installing custom modules for PHP handled by Plesk. So I assume that all required software to build the modules is installed.
For PHP 7.0 simply run:
$ /opt/plesk/php/7.0/bin/pecl install apcu
PHP 5.6 is a bit more stable for running OwnCloud. However you will get an error that you need at least PHP 7.0 for installing ACPU. This is true for the current release (>5.0). So simply install the stable 4.x release:
This article is inspired by https://devblog.plesk.com/2015/08/adding-custom-php-modules-in-plesk/. It was written for CentOs/Fedora/RedHat servers having yum instead of apt. I run Ubuntu 12.04 LTS on a virtual server. Among other applications I host WordPress and OwnCloud here. Plesk allows to use newer PHP versions (5.6.x and 7.0.x) instead of the dated one (5.4.x) that comes with my old Ubuntu.
Here are the necessary steps:
Install required packages to compile modules for PHP
Be aware that there may be some other packages that you need to install that I did not list here since they probably were already installed on my server. If you run into missing headers this might be an indicator for that.
Install the memcached module:
$ /opt/plesk/php/5.6/bin/pecl install memcached
You will be asked for the “libmemcached directory [no] :”
The default is “no”. If you have no need for sasl answer:
If you need memcached with sasl2 support you can install it manually following this advice.
After the installation is finished you need to register the module with Plesk:
$ echo "extension=memcached.so" > /opt/plesk/php/5.6/etc/php.d/memcached.ini
$ plesk bin php_handler --reread