php安裝memcacheq
berkeley: http://download.oracle.com/otn/berkeley-db/db-6.1.19.tar.gz?AuthParam=1408431634_4887d44685da5a09c70e30bd7d933861 memcacheq: https://codeload.github.com/stvchu/memcacheq/zip/master
./configure –with-libevent –with-bdb=/usr/local/berkeleydb/ –enable-threads –prefix=/usr/local/memcacheq
/usr/local/memcacheq/bin/memcacheq -h
問題:
/usr/local/memcacheq/bin/memcacheq: error while loading shared libraries: libdb-6.1.so: cannot open shared object file: No such file or directory
解決 :
sudo ln -s /usr/local/berkeleydb/lib/libdb-6.1.so /usr/lib/
ldconfig
sudo /usr/local/memcacheq/bin/memcacheq -d -uwww -r -p11212 -H /data/mcq -N -R -v -L 1024 -B 1024 > /home/wwwlogs/mq_error.log
telnet 127.0.0.1 11212
$memcache_obj = new Memcached; $memcache_obj->addServer(`127.0.0.1`,11212); $memcache_obj->set(`int`,9); $a = $memcache_obj->get(`int`); var_dump($a); $a = $memcache_obj->get(`int`); var_dump($a);
result:
[jackluo@localhost mcq]$ php memcacheq.php
int(9)
bool(false)
$m = new Memcached;
$m->addServer("127.0.0.1",11212);
$m->set("mailq","zhangsan");
$m->set("mailq","lisi");
$m->set("mailq","wangwu");
print "------push bellow into mailq queue------ ";
print "zhangsan ";
print "lisi ";
print "wangwu ";
print "------get mailq from mailq queue------ ";
print "first:".$m->get("mailq")." ";
print "second:".$m->get("mailq")." ";
print "third:".$m->get("mailq")." ";
print "fourth:".$m->get("mailq");
相關文章
- 安裝memcacheq
- linux 安裝yum 安裝phpLinuxPHP
- yum 安裝 PHPPHP
- docker 安裝 PHPDockerPHP
- 安裝 PHP 8.0PHP
- php模組安裝PHP
- CentOS 安裝PHPCentOSPHP
- PHP-安裝-PHP7.4PHP
- CentOS7安裝php、安裝MySqlCentOSPHPMySql
- php 安裝zip模組PHP
- RedHat 7 安裝PHPRedhatPHP
- php5安裝PHP
- php安裝步驟PHP
- 安裝PHP的memcachePHP
- memcached安裝和php擴充套件memcache安裝PHP套件
- 安裝php出現make: *** [sapi/cli/php]PHPAPI
- php以及php擴充套件memcache 安裝PHP套件
- 安裝php擴充套件 ffmpeg-phpPHP套件
- Mac 安裝 PHP7.2MacPHP
- ubuntu 安裝php7.1UbuntuPHP
- CentOS 7 安裝 PHP 7.2CentOSPHP
- linux + php 安裝curlLinuxPHP
- php常用外掛安裝PHP
- PHP 擴充套件安裝PHP套件
- centos PHP 編譯安裝CentOSPHP編譯
- ubuntu 安裝php8.0UbuntuPHP
- 安裝PHP ImageMagick筆記PHP筆記
- httpd編譯安裝phphttpd編譯PHP
- (MAC) PHP安裝和配置MacPHP
- ubuntu 安裝php7.2UbuntuPHP
- 樹莓派上安裝php樹莓派PHP
- 【PHP Composer】安裝&使用PHP
- [PHP Composer] 安裝&使用PHP
- PHP7 安裝 xhprofPHP
- PHP的編譯安裝PHP編譯
- php安裝步驟(正式)PHP
- Linux下安裝phpLinuxPHP
- CentOS6.4安裝PHPCentOSPHP