Last active
May 19, 2024 15:54
-
-
Save strategio/797087099cea854f1b614a8f81be2935 to your computer and use it in GitHub Desktop.
Setup memcached in a Local by Flywheel site
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
PHP_VERSION=$1 | |
CONF_FOLDER="/conf/php/${PHP_VERSION}/" | |
PHP_INI="${CONF_FOLDER}php.ini" | |
apt-get -y update | |
apt-get -y install memcached | |
service memcached start | |
# Now for installing php 7 memcached extension | |
apt-get -y install build-essential pkg-config git autoconf | |
apt-get -y install libmemcached-dev libmsgpack-dev libmsgpackc2 | |
cd ${CONF_FOLDER} | |
git clone --depth 1 https://github.com/php-memcached-dev/php-memcached.git | |
cd php-memcached | |
/opt/php/${PHP_VERSION}/bin/phpize | |
./configure --with-php-config=/opt/php/${PHP_VERSION}/bin/php-config | |
make install | |
make test | |
# 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
Hi @michael-sumner!
Sorry but this snippet is 5 years old and I didn't even remember it existed...
And now I don't use Local anymore.