linux下安裝php的memcached客戶端

linux下安裝php的memcached客戶端

下面將介紹安裝php的memcached客戶端安裝步驟

1、下載安裝libmemcached客戶端
官網地址:http://libmemcached.org/libMemcached.html


$wget -c https://launchpad.net/libmemcached/1.0/1.0.16/ download/libmemcached-1.0.16.tar.gz
#親 千萬不要下載1.0.17哦 有bug
$tar -zxvf libmemcached-1.0.16.tar.gz
$cd libmemcached-1.0.16
$./configure --prefix=/usr/local/libmemcached --with-memcached
$sudo make
$sudo make install

2、下載安裝memcached
官網地址:http://pecl.php.net/package/memcached


$wget -c http://pecl.php.net/get/memcached-2.2.0b1.tgz
$tar -zxvf memcached-2.2.0b1.tgz
$cd memcached-2.2.0b1
$sudo /usr/local/php/bin/phpize
$./configure --enable-memcached --with-php-config=/usr/local/php/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached --disabled-memcached-sasl
$sudo make
$sudo make install

3、重啟php nginx


$sudo /etc/init.d/nginx restart
$sudo /etc/init.d/php restart

注:如何編寫重啟nginx和php指令碼 參考
php啟動指令碼
nginx啟動指令碼

4、檢查是否安裝成功
phpinfo()函式 如果出現如下 則說明安裝成功

您可能感興趣的文章:

CentOS 5.4下的Memcache安裝步驟(Linux Nginx PHP Memcached)linux下編譯安裝memcached服務在Linux伺服器上安裝 memcached的基本操作Linux 下安裝 memcached 及 memcacheq的方法linux下安裝memcached_動力節點Java學院整理