一。安装memcache
brew info memcached
6880 brew info libevent
6882 brew install automake
6885 brew install doxygen
6886 brew install pkg-config
6887 brew info libevent
6888 brew install libevent
6889 brew upgrade libevent
6890 export PKG_CONFIG_PATH="/usr/local/opt/curl-openssl/lib/pkgconfig"
6891 echo 'export PATH="/usr/local/opt/curl-openssl/bin:$PATH"' >> ~/.zshrc
6892 export LDFLAGS="-L/usr/local/opt/curl-openssl/lib"\n export CPPFLAGS="-I/usr/local/opt/curl-openssl/include"
6893 brew info memcached
6894 brew install memcached
6895 memcached -v
6897 ps -ef|grep memcached
6898 kill -9 45875
6899 ps -ef|grep memcached
6900 kil -9 64145
6902 ps -ef|grep memcached
6905 ps -ef|grep memcached
6906 memcached
6907 ps -ef|grep memcached
6908 memcached -h
6909 brew upgrade memcached
6910 memcached -h
6911 telnet localhost 11211
6912 brew install telnet
6913 telnet localhost 11211 //链接memcached
二。安装php的memcachd扩展
sudo git clone -b php7 https://github.com/php-memcached-dev/php-memcached.git
6976 ls
6977 cd php-memcached
6978 ls
6979 sudo phpize
6980 sudo ./configure --enable-memcache --with-php-config=/usr/bin/php-config
6981 --with-libmemcached-dir
6982 sudo make
6983 cd ..
6984 ls
6989 brew install libmemcached
6990 ls
6991 cd php-memcached
6993 sudo ./configure --enable-memcache --with-php-config=/usr/bin/php-config --enable-memcache
6994 sudo make
6995 sudo make install
6996 cd /private/etc
6997 ld
6998 ls
6999 sudo vim php.ini //在php的配置文件中添加memcached扩展
7000 sudo killall php-fpm
7001 sudo php-fpm
7016