栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

php的memcache安装

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

php的memcache安装

1、安装libevent


memcached基于livevent的事件处理,所以首先安装libevent,用yum安装的话版本较低,所以编译安装

#tar zxvf libevent-1.4.13-stable.tar.gz

#cd libevent-1.4.13-stable

#./configure&& make&& make install


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


2、安装memcached


#tarzxvf memcached-1.4.5.tar.gz

#./configure

#make && make install


安装完成后,memcached的默认目录为/usr/local/bin/memcached


添加链接库到ld.so.conf

#echo “/usr/local/lib”>>/etc/ld.so.conf

#ldconfig


启动memcached:

/usr/local/bin/memcached –m128 –p 11211 –d –u root –P /var/run/memcached.pid –vv


测试:telnet localhost 11211


关闭memcached: #kill` cat /var/run/memcached.pid`


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


3、安装memcache的php扩展

首先,打开phpize

#/usr/local/php5/bin/phpize

#tar zxvf memcache-2.2.5.tar.gz

#./configure –eanble-memcache–with-php-config=/usr/local/php5/bin/php-config

#make && makeinstall


然后根据提示,把生成的.so文件加入到php.ini里面



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/225480.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号