home_dir=/usr/src;cd $home_dir;wget https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz && tar -xf libevent-2.1.8-stable.tar.gz;cd libevent-2.1.8-stable;$home_dir/libevent-2.1.8-stable/configure && make && make install;cd $home_dir;wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz && tar -xf libmemcached-1.0.18.tar.gz;cd libmemcached-1.0.18;$home_dir/libmemcached-1.0.18/configure && make && make install;cd $home_dir;wget http://www.memcached.org/files/memcached-1.5.1.tar.gz;tar -xf memcached-1.5.1.tar.gz;cd memcached-1.5.1;$home_dir/memcached-1.5.1/configure --with-libevent=/usr/local/ && make && make install;cd /etc;wget http://nitemarecks.com/resources/memcached.conf;cd /etc/init.d/;wget http://nitemarecks.com/resources/memcached && chmod +x memcached;cd /usr/local/bin/;wget http://nitemarecks.com/resources/start-memcached && chmod +x start-memcached;for p in $(\ls -1 /opt/cpanel/ | grep ea-php);do /opt/cpanel/$p/root/usr/bin/pecl install memcache;done;cd /usr/src;wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip;unzip NON_BLOCKING_IO_php7.zip;cd pecl-memcache-NON_BLOCKING_IO_php7;for p in $(\ls -1 /opt/cpanel | grep ea-php7); do /opt/cpanel/$p/root/usr/bin/phpize && /usr/src/pecl-memcache-NON_BLOCKING_IO_php7/configure --with-php-config=/opt/cpanel/$p/root/usr/bin/php-config && make && make install && make clean;echo 'extension=memcache.so' >> /opt/cpanel/$p/root/etc/php.ini;done;echo "Memcache installed";for p in $(\ls -1 /opt/cpanel/ | grep ea-php);do echo "$p";/opt/cpanel/$p/root/usr/bin/php -m | grep -i memcache;done;