一.下载memcached安装包
wget http://www.danga.com/memcached/dist/memcached-1.2.2.tar.gz
安装memcache安装包
tar xvzf memcached-1.2.2.tar.gz 解压缩
cd memcached-1.2.2 进入目录
./configure -with-libevent=/usr 设置环境
make 编译
make install 安装
ls -al /usr/local/bin/mem* 有以下这些现实,说明安装OK
[root@bogon ~]# ls -al /usr/local/bin/mem*
-rwxr-xr-x 1 root root 105602 Mar 13 23:03 /usr/local/bin/memcached
-rwxr-xr-x 1 root root 112133 Mar 13 23:03 /usr/local/bin/memcached-debug
二.下载libevent安装包
wget http://www.monkey.org/~provos/libevent-1.3.tar.gz
安装libevent安装包
tar xvzf libevent-1.3.tar.gz
cd libevent-1.3
./configure -prefix=/usr
make
make install
ls -al /usr/lib |grep libevent 这条用来确认 是否libevent安装成功,如果有下面提示,说明安装已经OK.
ls -al /usr/lib |grep libevent
lrwxrwxrwx 1 root root 21 Mar 13 23:00 libevent-1.3.so.1 -> libevent-1.3.so.1.0.3
-rwxr-xr-x 1 root root 221674 Mar 13 23:00 libevent-1.3.so.1.0.3
-rw-r--r-- 1 root root 289192 Mar 13 23:00 libevent.a
-rwxr-xr-x 1 root root 805 Mar 13 23:00 libevent.la
lrwxrwxrwx 1 root root 21 Mar 13 23:00 libevent.so -> libevent-1.3.so.1.0.3
三.下载memcached安装包
wget http://pecl.php.net/get/memcache-2.2.6.tgz
tar xzvf memcache-2.2.6.tgz 解压
cd memcache-2.2.6
/usr/bin/phpize 执行phpize命令,如果该目录下没有该执行文件,请查找(find / -name 'phpize'),并找到相应位置