php memcached使用,php 使用memcached 安装配置

1、安装libeven

memcached的使用需要libeven的支持,我们得先装上libeven。

官方网站:http://www.monkey.org/~provos/libevent/

libevent安装方式比较简单:

./configure && make

make install

检查是否 已经安装

ls -l /usr/local/lib/ | grep even

2、安装memcached

官方网站:http://www.danga.com/memcached/download.bml

memcached安装需要些参数:

以下是代码片段:

./configure

make

make install

3、测试

/usr/local/bin/memcached -h

正常ok

常见错误

/usr/local/bin/memcached: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory

解决办法

LD_DEBUG=libs memcached -v

输出

32179:     find library=libevent-1.4.so.2 [0]; searching

32179:      search cache=/etc/ld.so.cache

32179:      search path=/lib/tls/i686/sse2:/lib/tls/i686:/lib/tls/sse2:/lib/tls:/lib/i686/sse2:/lib/i686:/lib/sse2:/lib:/usr/lib/tls/i686/sse2:/usr/lib/tls/i686:/usr/lib/tls/sse2:/usr/lib/tls:/usr/lib/i686/sse2:/usr/lib/i686:/usr/lib/sse2:/usr/lib(system search path)

32179:       trying file=/lib/tls/i686/sse2/libevent-1.4.so.2

32179:       trying file=/lib/tls/i686/libevent-1.4.so.2

32179:       trying file=/lib/tls/sse2/libevent-1.4.so.2

32179:       trying file=/lib/tls/libevent-1.4.so.2

32179:       trying file=/lib/i686/sse2/libevent-1.4.so.2

32179:       trying file=/lib/i686/libevent-1.4.so.2

32179:       trying file=/lib/sse2/libevent-1.4.so.2

32179:  &

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值