您好,登錄后才能下訂單哦!
1、因?yàn)閜hp_memcached是依賴libmemcached庫,所以首先安裝libmemcached庫,需要安裝libmemcached-1.x以上版本
wget https://launchpad.net/libmemcached/1.0/1.0.16/+download/libmemcached-1.0.16.tar.gz
tar -zxvf libmemcached-1.0.16.tar.gz
cd libmemcached-1.0.16
./configure -prefix=/usr/local/libmemcached
make && make install
2.安裝擴(kuò)展,這里我們使用php自帶的pecl命令來安裝php擴(kuò)展。
/usr/local/webserver/php/bin/pecl install memcached
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading memcached-2.2.0.tgz ...
Starting to download memcached-2.2.0.tgz (70,449 bytes)
.................done: 70,449 bytes
15 source files, building
running: phpize
Configuring for:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212
libmemcached directory [no] : /usr/local/libmemcached
building in /tmp/pear/temp/pear-build-rootjTskoD/memcached-2.2.0
running: /tmp/pear/temp/memcached/configure --with-libmemcached-dir=/usr/local/libmemcached
...............................
...............................
3、安裝完成后在配置文件添加
vim /usr/local/webserver/php/etc/php.ini
extension=memcached.so
4.重啟web服務(wù)器
service nginx restart
5.重啟php
service php-fpm restart
6.驗(yàn)證
php -m|grep memcache
memcache
memcached
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。