You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
753 B

  1. #!/bin/bash
  2. apt-get update && apt-get install gcc make autoconf libc-dev pkg-config plesk-php72-dev zlib1g-dev libmemcached-dev unzip -y &>/dev/null
  3. cd /opt/plesk/php/7.2/include/php/ext
  4. wget -O phpmemcached-php7.zip https://github.com/php-memcached-dev/php-memcached/archive/php7.zip
  5. unzip phpmemcached-php7.zip
  6. cd php-memcached-php7/
  7. /opt/plesk/php/7.2/bin/phpize
  8. ./configure --with-php-config=/opt/plesk/php/7.2/bin/php-config
  9. export CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"
  10. make
  11. make install
  12. ls -la /opt/plesk/php/7.2/lib/php/modules/
  13. echo "extension=memcached.so" >/opt/plesk/php/7.2/etc/php.d/memcached.ini
  14. /usr/local/psa/bin/php_handler --reread
  15. service plesk-php72-fpm restart
  16. apt-get install memcached -y
  17. service memcached restart