安装所要软件 wget http://launchpad.net/libmemcached/1.0/0.42/+download/libmemcached-0.42.tar.gz wget http://pecl.php.net/get/memcached-1.0.2.tgz memcached的官方网站 http://www.memcached.org/ 安装libmemcached
tar zxvf libmemcached-0.42.tar.gz 安装要注意的问题: 1, 安装过程中不要忘了,–with-memcached,不然会提示你
checking for memcached… no 2,你的memcached是不是1.2.4以上的,如果不是会提示你
clients/ms_thread.o: In function `ms_setup_thread’: 解决办法是–disable-64bit LAGS=”-O3 -march=i686″,
最好的方法是换个版本的软件 https://launchpad.net/libmemcached/1.0/0.51/+download/libmemcached-0.51.tar.gz ./configure --prefix=/usr/local/libmemcached --with-memcached
php的扩展memcached的安装
tar zxvf memcached-1.0.2.tar.gz ./configure --with-memcached -with-php-config=/usr/local/php/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached --enable-memcached make && make install vi /usr/local/php/lib/php.ini 加上extension=memcached.so重起一下服务就可以了。 (责任编辑:IT) |