Memcache installation under Windows
1, download memcache for Windows. Download Address: http://jehiah.cz/projects/memcached-win32, recommended download binaries version, decompression (in this case, extract to c:memcached).
2, in the command line State input:
c:/memcached/memcached.exe-d Install
This memcached has been installed as a Windows service
3. At the command line, enter:
c:/memcached/memcached.exe-d start
To start the memcached service. Of course, you can also choose to start in Windows services
You're right, that's it. Simple three-step memcache server End is ready
PHP Installation memcached module support
1, download the Php_memcache.dll module, you can find the corresponding version from Http://downloads.php.net/pierre/,
php5.3 Direct Download Http://shikii.net/blog/downloads/php_memcache-cvs-20090703-5.3-VC6-x86.zip
2, modify the php.ini, add the following content:
Extension=php_memcache.dll
3, restart the Apache server, and then look at the phpinfo, if there is memcache, then the installation is successful!
To test memcached under Windows
The test code is as follows:
<?php
$mem = new Memcache;
$mem->connect ("127.0.0.1", 11211);
$mem->set (' key ', ' Hello memcached! ', 0, 60);
$val = $mem->get (' key ');
Echo $val;
More test code, need to be:
http://www.php.net/manual/en/memcache.examples-overview.php
Basic settings for memcached
-P Listening Port
The IP address of the-l connection, the default is native
-D Start memcached service
-D Restart Restart memcached service
-D Stop|shutdown shut down the running memcached service
-D Install installation memcached service
-d Uninstall Uninstall memcached service
-U Run as (only valid when run as root)
-m maximum memory usage, in MB. Default 64MB
-Returns an error when M memory is exhausted instead of deleting the item
-C Maximum Simultaneous connection number, default is 1024
-F Block size growth factor, default is 1.25
-N Minimum allocation space, key+value+flags default is 48
-H Display Help