现在的位置: 首页 > 综合 > 正文

64位windows安装memcached并使PHP支持

2017年03月16日 ⁄ 综合 ⁄ 共 1773字 ⁄ 字号 评论关闭

Basics

The memcache sonsists of 2 parts: the server MemCached and the client MemCache.

  • MemCached is the cache server, the same as Mysqld (mysql server), which save and feed cache to clients.
  • MemCache is a client. With php, we need to install it as a mod, just the same as pdo_mysql (php_pdo_mysql.dll on windows).

Install MemCached

  • Download memcached from http://code.jellycan.com/memcached/ (get the
    win32 binary version
    ). Here we suppose you extract the memcached in d:\memcached\.
  • If you are on Sindows Vista/7, rightclick on memcached.exe and select Properties; click on the Compatibility tab. At the bottom you’ll see Privilege Level, check “Run this program as an administrator”.
  • Open the command line by Win + R (or Start -> All Programs -> Accessories -> Command Prompt), and then run: d:\memcached\memcached.exe
    -d install
     to install the service.
  • Still in the command line, run d:\memcached\memcached.exe -d start, or net
    start "memcached Server"
     to start the service.
  • Check whether the service is running. Open Windows Task Manager, go to Services tab, you should find status of “memcached server” is “Running”.

Install MemCache php module

Note

  • To change MemCached memory size (default is 64mb), go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\memcached Server in your registry, find the ImagePath entry and change it to:
    “C:\memcached\memcached.exe” -d runservice -m 512
  • More details see: memcached -help

老外的文章,其中有文件下载必须翻墙,已经转存到金山快盘。
http://www.kuaipan.cn/file/id_14162220866871596.htm

抱歉!评论已关闭.