Here’s how I managed to install the memcached module for php 7.0 running on a server running CentOS with DirectAdmin.
Install the remi repo and install the latest version of memcached and libmemcached
yum -y install http://rpms.remirepo.net/enterprise/remi-release-$(awk -F 'release ' '{print $2}' /etc/system-release| head -c 1).rpm yum --enablerepo remi install memcached libmemcached-last libmemcached-last-devel git
Now configure and install the memcached extension:
cd ~ git clone https://github.com/php-memcached-dev/php-memcached.git cd php-memcached git checkout php7 phpize ./configure --disable-memcached-sasl --with-php-config=/usr/local/php70/bin/php-config make sudo make install
Add the extension to the php config:
echo "extension=memcached.so" | sudo tee /usr/local/php70/lib/php.conf.d/60-memcached.ini
And finally, restart php-fpm:
service php-fpm70 restart
Or if you run mod_php:
service httpd restart