Skip to content

Instantly share code, notes, and snippets.

@petenelson
Forked from strategio/activate-memcached.sh
Created February 21, 2024 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petenelson/5869d615157840deb27c1e19f709b93e to your computer and use it in GitHub Desktop.
Save petenelson/5869d615157840deb27c1e19f709b93e to your computer and use it in GitHub Desktop.
Setup memcached in a Local by Flywheel site
#!/usr/bin/env bash
PHP_VERSION=$1
CONF_FOLDER="/usr/local/etc/php/${PHP_VERSION}/"
PHP_INI="${CONF_FOLDER}php.ini"
cd ${CONF_FOLDER}
git clone --depth 1 https://github.com/php-memcached-dev/php-memcached.git
cd php-memcached
/usr/local/bin/phpize
./configure --with-php-config=/usr/local/bin/php-config
make install
# Include memcached in php.ini
echo "[memcached]" >> ${PHP_INI}
echo "extension = ${CONF_FOLDER}/php-memcached/modules/memcached.so" >> ${PHP_INI}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment