Skip to content

Instantly share code, notes, and snippets.

@levabd
Created September 6, 2016 18:54
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 levabd/f486aa853200692bdccdd1aa7b2d938f to your computer and use it in GitHub Desktop.
Save levabd/f486aa853200692bdccdd1aa7b2d938f to your computer and use it in GitHub Desktop.
Memcached + PHP memcache recipe for stack-updater
[
{
"name": "Memcached",
"command": "/usr/bin/dpkg -l | awk '$2==\"memcached\" { print $3 }'",
"required": "1.4.14",
"comparison": ">=",
"installer": "memcached.sh",
"order": "1"
},
{
"name": "libmemcached 11",
"command": "/usr/bin/dpkg -l | awk '$2==\"libmemcached11:amd64\" { print $3 }'",
"required": "1.0.18",
"comparison": ">=",
"order": "2"
},
{
"name": "Memcached driver for PHP7",
"command": "/usr/bin/php -r 'echo phpversion(\"memcached\");'",
"required": "1.6.0",
"comparison": ">=",
"installer": "php7memcached.sh",
"order": "3"
}
]
#!/bin/bash
set -e #exit immediately if a simple command exits with a nonzero exit value
apt-get update
apt-get install -y memcached libmemcached11
sudo /etc/init.d/memcached restart
#!/bin/bash
set -e #exit immediately if a simple command exits with a nonzero exit value
apt-get update
apt-get install -y php-memcached
phpenmod memcached
sudo /etc/init.d/php7.0-fpm start
sudo /etc/init.d/php7.0-fpm restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment