Install memcached and memcache for PHP on windows

1. Download the memcached for windows in URL: http://jehiah.cz/projects/memcached-win32/

2. Unzip the binaries in your desired directory (eg. c:/memcached)

3. Install the service using the command: 'c:/memcached/memcached.exe -d install' from either the command line

4. Start the server from the Microsoft Management Console or by running the following command: 'c:/memcached/memcached.exe -d start'

5. Use the server, by default listening to port 11211

6. Download the PHP memcache extension for windows in URL: http://downloads.php.net/pierre/

7. Copy it to PHP extensions directory (eg. c:/PHP/ext)

8. Open php.ini and add 'extension=php_memcache.dll'

9. Restart your web server and check the phpinfo

 

 

PS:

Other settings for memcached:

 

-p <num>      TCP port number to listen on (default: 11211)
-U <num>      UDP port number to listen on (default: 0, off)
-s <file>     unix socket path to listen on (disables network support)
-l <ip_addr>  interface to listen on, default is INDRR_ANY
-d start          tell memcached to start
-d restart        tell running memcached to do a graceful restart
-d stop|shutdown  tell running memcached to shutdown
-d install        install memcached service
-d uninstall      uninstall memcached service
-r            maximize core file limit
-u <username> assume identity of <username> (only when run as root)
-m <num>      max memory to use for items in megabytes, default is 64
-M            return error on memory exhausted (rather than removing i
-c <num>      max simultaneous connections, default is 1024
-k            lock down all paged memory
-v            verbose (print errors/warnings while in event loop)
-vv           very verbose (also print client commands/reponses)
-h            print this help and exit
-i            print memcached and libevent license
-b            run a managed instanced (mnemonic: buckets)
-P <file>     save PID in <file>, only used with -d option
-f <factor>   chunk size growth factor, default 1.25
-n <bytes>    minimum space allocated for key+value+flags, default 48

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值