How to install Memcache in Windows. How to install Memcache for MemcacheWindows in Windows: 1. download the stable version of memcache for windows and decompress it to a disk. for example, in c: memcached2. on a terminal (that is, how to install Memcache in Windows in the cmd command line)
Install Memcache in Windows:
1. download the stable version of memcache for windows and decompress it to a disk, for example, in c: memcached
2. enter 'C: memcachedmemcached.exe-d install' on the terminal (that is, the cmd command interface) to install
3. enter 'C: memcachedmemcached.exe-d start' to start. NOTE: In the future, memcached will be used as a windows service and will be automatically started every time it is started. In this way, the server has been installed.
4. Download php Tutorial _ memcache. dll. find the corresponding php version file by yourself.
5. add a line 'extension = php_memcache.dll 'to C: winntphp. ini'
6. restart Apache and check phpinfo. if memcache exists, the installation is successful!
Basic settings of memcached:
-P listening port
-L connected IP address. the default value is local
-D start: start the memcached service.
-D restart: restart the memcached service.
-D stop | shutdown the running memcached service
-D install the memcached service
-D uninstall memcached service
-U runs as the identity (only valid when running as root)
-MB maximum memory usage, in MB. The default value is 64 MB.
-An error is returned when M memory is used up, instead of deleting items.
-C: maximum number of simultaneous connections. the default value is 1024.
-F block size growth factor, default value: 1.25
-N: Minimum allocation space. the default value of key + value + flags is 48.
-H Show Help
Test the Memcache environment:
Run the following php file. if This is a test! is output !, Indicates that the environment is successfully set up. Start to appreciate the charm of Memcache!
<? Php
$ Mem = new Memcache;
$ Mem-> connect ("127.0.0.1", 11211 );
$ Mem-> set ('key', 'This is a test! ', 0, 60 );
$ Val = $ mem-> get ('key ');
Echo $ val;
?>
Install Memcache in Windows on external: 1. download the stable version of memcache for windows, decompress it and put it under a certain disk, for example, in c: memcached 2. on the terminal (that is, the cmd command line...