没什么写的 直接复制可用内容
转发自:https://blog.csdn.net/codepen/article/details/53000140
linux下配置使用memcache功能,比win下稍微复杂一点,主要包括:安装libevent函数库、安装memcached、配置php扩展。
一、安装libevent函数库
libevent各版本地址:http://libevent.org/old-releases.html
在此我安装当前最稳定版本:libevent-2.0.21
1.下载:#wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
2.解压:#tar libevent-2.0.21-stable.tar.gz
3.配置:#./configure -prefix=/home/libevent-2.0.21-stable
4编译安装:
#make
#make install
1
2
(我安装到了/home/libevent-2.0.21-stable/下)
4.检查是否安装成功:
#ls -al /home/libevent-2.0.21-stable/lib | grep libevent
1
2
二、安装memcached
memcached各版本下载地址:https://github.com/memcached/memcached/wiki/ReleaseNotes
在此我安装当前最稳定版本: memcache-1.4.32
1.下载:#wget http://memcached.org/files/memcached-1.4.32.tar.gz
2.解压:#tar memcached-1.4.32.tar.gz
3.配置:#./configure –with-libevent=/home/memcached-1.4.32
4.编译安装:
#make
#make install
1
2
(同样安装到了/home/memcached-1.4.32/下)
5.查看是否安装成功:
6.启动服务端:
# /home/memcached-1.4.32/bin/memcached -d -m 1024 -u root -l ip地址 -p 11211 -c 1024 -P /t