Last active
May 23, 2018 07:48
-
-
Save wtnabe/36d830d4d6c168d1ffb86bb5356c3365 to your computer and use it in GitHub Desktop.
This file contains 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
#! /bin/sh | |
xcode-select --install | |
brew install php@5.6 postgresql@9.4 brew-php-switcher libmemcached | |
brew link --force php@5.6 | |
brew link --force postgresql@9.4 | |
# | |
# install pecl libmemcached | |
# | |
git clone -b 2.2.0 https://github.com/php-memcached-dev/php-memcached | |
cd php-memcached | |
phpize | |
./configure --with-libmemcached-dir=$(brew --prefix libmemcached) | |
make | |
make install | |
cd .. | |
rm -fr php-memcached | |
# | |
# enable libmemcached | |
# | |
INI_DIR=`php --ini | awk '/Scan for additional.[^\/]+(\/.*)/ {match($0, /\/.*/); print substr($0, RSTART, RLENGTH)}'` | |
LIB_DIR=`php -r 'ini_set("error_reporting", "0"); phpinfo();' | awk '/^extension_dir/ {print $NF}'` | |
cat <<EOD > $INI_DIR/ext-memcached.ini | |
[memcached] | |
extension=$LIB_DIR/memcached.so | |
EOD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment