发表者:admin分类:Linux2015-03-09 00:25:37浏览:1174次评论:0次,我来说两句
一,安装所要软件
wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
wget http://pecl.php.net/get/memcached-2.2.0.tgz
memcached的官方网站 http://www.memcached.org


二,安装libmemcached
tar zxvf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18
./configure --prefix=/usr/local/libmemcached  --with-memcached
make && make install


三,php的扩展memcached的安装
tar zxvf memcached-2.2.0.tgz
cd memcached-2.2.0
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-libmemcached-dir=/usr/local/libmemcached
make && make install


vi /usr/local/php/lib/php.ini
加上extension=memcached.so


重起一下服务就可以了。

memcached -d -m 10 -u root -l 192.168.0.200 -p 12000 -c 256 -P /tmp/memcached.pid



如果从外网无法连接memcached服务器,

在ubuntu下,修改配置文件/etc/memcahced.conf   找到 -l 127.0.0.1  更改为 -l 0.0.0.0
启动memcached  :  /etc/init.d/memcachced start

Tags:

名字:

个人主页地址:

E-mail:

评论列表