Memcache安装
   * tar zxf memcache-2.2.5.tgz  
   * cd memcache-2.2.5
   * phpize 

wKiom1l0DmTiiLeXAABirbDJ_-A804.png 

   * ./configure  

memcache + openresty_第1张图片

   * make  && make install
   * cd  /usr/local/lnmp/php/etc/
   * vim php.ini 

wKioL1l0DsTikiuKAAAQMhLUZfY202.png

   * /etc/init.d/php-fpm reload

wKioL1l0DuOQ4JgHAAAot-FFqfE120.png

   * yum install memcached -y
   * /etc/init.d/memcached start

wKiom1l0Dv6Sz0S8AACHIwF6dkg841.png

   * cp memcache.php /usr/local/lnmp/nginx/html

   * vim memcache.php

memcache + openresty_第2张图片

   * cp example.php /usr/local/lnmp/nginx/html/

wKioL1l0DxOxjDAyAABe30xJksY547.png

   测试

wKiom1l0D6yhHv89AAAsU8dMHP8514.png

memcache + openresty_第3张图片


    2.openresty

    * tar zxf openresty-1.11.2.3.tar.gz

    * cd  /openresty-1.11.2.3

    *  ./configure

    * gmake && gmake install

wKioL1l0EK6Bhh10AADRI5qMWsM753.png

    * vim /usr/local/openresty/nginx/conf/nginx.conf


wKiom1l0ESSgDUTzAAAdTLuh1Lc703.png

memcache + openresty_第4张图片

memcache + openresty_第5张图片

    

   测试

memcache + openresty_第6张图片