# CHOST="i686-pc-linux-gnu" CFLAGS="-O3 -msse2 -mmmx -Wall -W -mfpmath=sse -mcpu=pentium4 -march=pentium4 -pipe -fomit-frame-pointer" CXXFLAGS="-O3 -msse2 -mmmx -Wall -W -mfpmath=sse -funroll-loops -mcpu=pentium4 -march=pentium4 -pipe -felide-constructors -fno-exceptions -fno-rtti -fomit-frame-pointer" ./configure --prefix=/usr/local && make && make install
# echo "/usr/local/lib" >> /etc/ld.so.conf && ldconfig
# cd ../
# wget http://www.danga.com/memcached/dist/...d-1.2.3.tar.gz
# tar zxvf memcached-1.2.3.tar.gz
# cd memcached-1.2.3
# CHOST="i686-pc-linux-gnu" CFLAGS="-O3 -msse2 -mmmx -Wall -W -mfpmath=sse -mcpu=pentium4 -march=pentium4 -pipe -fomit-frame-pointer" CXXFLAGS="-O3 -msse2 -mmmx -Wall -W -mfpmath=sse -funroll-loops -mcpu=pentium4 -march=pentium4 -pipe -felide-constructors -fno-exceptions -fno-rtti -fomit-frame-pointer" ./configure --prefix=/usr/local/memcached --with-libevent=/usr/local
# make && make install
备注:如果 libevent 不是安装在 /usr 目录下,那么需要把 libevent-1.3e.so.1 拷贝/链接到 /usr/lib 中,否则 memcached 有可能无法正常加载。
(2)、安装php对memcache支持模块
安装php-memcache模块,这是memcache的php客户端,php-memcache需要pecl库的支持。
# cd /usr/local/src
# wget http://pecl.php.net/get/memcache-2.2.0.tgz
# tar zxvf memcache-2.2.0.tgz
#cd memcache-2.2.0
#export PHP_PREFIX=/usr/local/php
#$PHP_PREFIX/bin/phpize
#CHOST="i686-pc-linux-gnu" CFLAGS="-O3 -msse2 -mmmx -Wall -W -mfpmath=sse -mcpu=pentium4 -march=pentium4 -pipe -fomit-frame-pointer" CXXFLAGS="-O3 -msse2 -mmmx -Wall -W -mfpmath=sse -funroll-loops -mcpu=pentium4 -march=pentium4 -pipe -felide-constructors -fno-exceptions -fno-rtti -fomit-frame-pointer" ./configure --enable-memcache --with-zlib-dir --with-php-config=$PHP_PREFIX/bin/php-config 相关文章
热门资讯