PHP中高级工程师面试重点讲解视频课程
Go快速入门浅显易懂视频教程-基础篇
Go快速入门浅显易懂视频教程-中级篇
memcached安装
原创杂文 / 时间:2014-11-25 09:30:49 / 阅读:1676 / 分享:0

memcached安装
1,memcached依赖于libevent API,因此要事先安装之,项目主页:http://libevent.org/,读者可自行选择需要的版本下载。本文采用的是目前最新版本的源码包libevent-2.0.16-stable.tar.gz。安装过程:
但是由于下载地址是github.com,在国内无法使用wget 并且使用--no-check-certificate还是不好使,使用curl -O -L 也不好使,我就在http://softlayer-dal.dl.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.21-stable.tar.gz下载
# wget http://softlayer-dal.dl.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.21-stable.tar.gz
# cd libevent-2.0.21-stable
# ./configure --prefix=/usr/local/libevent && make && make install
# echo "/usr/local/libevent/lib" > /etc/ld.so.conf.d/libevent.conf
# ldconfig
安装memcached
# wget http://www.memcached.org/files/memcached-1.4.21.tar.gz
# cd ..
# cd memcached-1.4.21.tar.gz
# ./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent
# make && make install
启动memcached
# /usr/local/memcached/bin/memcached -u nobody -p 11211 -d
链接memcached
# telnet 127.0.0.1 11211

 

附:关于如何在php扩展memcached,请去看lamp安装的教程

 

关于作者
按时间分类