- Install required packages to compile modules for PHP
$ apt-get install gcc build-essential plesk-php56-dev plesk-php70-dev libmemcached-dev libmemcache0 zlib1g-dev
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