memcached的基本设置: -p 监听的端口 -l 连接的IP地址, 默认是本机 -d start 启动memcache d服务 -d restart 重起memcached服务 -d stop|shutdown 关闭正在运行的memcached服务 -d install 安装memcached服务 -d uninstall 卸载memcached服务 -u 以的身份运行 (仅在以root运行的时候有效) -m 最大内存使用,单位MB。默认64MB -M 内存耗尽时返回错误,而不是删除项 -c 最大同时连接数,默认是1024 -f 块大小增长因子,默认是1.25-n 最小分配空间,key+value+flags默认是48 -h 显示帮助 php.ini中的配置: [Memcache] ; 一个高性能的分布式的内存对象缓存系统,通过在内存里维护一个统一的巨大的hash表, ; 它能够用来存储各种格式的数据,包括图像、视频、文件以及数据库检索的结果等。 ; 是否在遇到错误时透明地向其他服务器进行故障转移。 memcache.allow_failover = On ; 接受和发送数据时最多尝试多少个服务器,只在打开memcache.allow_failover时有效。memcache.max_failover_attempts = 20 ; 数据将按照此值设定的块大小进行转移。此值越小所需的额外网络传输越多。 ; 如果发现无法解释的速度降低,可以尝试将此值增加到32768。 [...]
下载地址:http://jehiah.cz/projects/memcached-win32/ 下载编译好的。 Unzip the binaries in your desired directory (eg. c:\memcached) Install the service using the command: ‘c:\memcached\memcached.exe -d install’ from either the command line Start the server from the Microsoft Management Console or by running the following command: ‘c:\memcached\memcached.exe -d start’ Use the server, by default listening to port 11211 上面说明文档, 1.解压memcached(如解压到:C:\memcached) 2.memcached解压后,进入cmd命令行,进入解压目录,运行(’c:\memcached\memcached.exe -d [...]
In: memcached
16 一 2007Memcached的使用和协议分析详解 作者:heiyeluren (黑夜路人) 邮箱:heiyeluren AT gmail.com 博客:http://blog.csdn.net/heiyeshuwu 时间:2006-11-12 关键字:PHP Memcached Linux 缓存 Memcached是danga.com的一个项目,最早是为 LiveJournal 服务的,目前全世界不少人使用这个缓存项目来构建自己大负载的网站,来分担数据库的压力。(关于Memcached的更多信息请Google) Memcached官方网站:http://www.danga.com/memcached 【安装Memcached服务器端】 我目前的平台,服务器是Fedora Core 1(内核:2.4.22),客户端是Windows XP SP2,需要安装的就是服务器的Memcached的守护进程和客户端的PHP扩展php_memcache两个东西。现在我分别来讲。 服务器端主要是安装memcached服务器端,目前的最新版本是 memcached-1.2.0 。 下载:http://www.danga.com/memcached/dist/memcached-1.2.0.tar.gz 另外,Memcached用到了libevent这个库用于Socket的处理,所以还需要安装libevent, libevent的最新版本是libevent-1.2。(如果你的系统已经安装了libevent,可以不用安装) 官网:http://www.monkey.org/~provos/libevent/ 下载: http://www.monkey.org/~provos/libevent-1.2.tar.gz 我分别把两个东东下载回来,放到 /tmp 目录下: # cd /tmp # wget http://www.danga.com/memcached/dist/memcached-1.2.0.tar.gz # wget http://www.monkey.org/~provos/libevent-1.2.tar.gz 先安装libevent: # tar zxvf libevent-1.2.tar.gz # cd libevent-1.2 # ./configure –prefix=/usr # [...]
最近评论