1, first download memcached-1.2.1-win32.zip
http://download.csdn.net/detail/u011986449/8110579
This is the version number under Windows, which is installed under the command line
Decompression Room C or other disk can be, such as my is the C disk memcache121 folder. Then go to the cmd command line, for example the following:
Microsoft Windows [version number 5.2.3790]
(C) All copyrights 1985-2003 Microsoft Corp.
C:\Documents andsettings\administrator>cd\
C:\>CD memcached121
C:\memcached121>memcached.exe-dinstall (Install as service)
C:\memcached121>memcached.exe-dstart (Start)
C:\memcached121>
This allows you to see the memcache.exe process inside the process. This will initiate itself every time you start
2. Download the PHP version number corresponding to the Php_memcache.dll (my PHP version number is php-5.2.9-1-win32.zip)
Download Pecl-5.2.6-win32.zip here at Http://cn.php.net/get/pecl-5.2.6-Win32.zip/from/a/mirror
Then unzip, copy the inside of the Php_memcache.dll to your PHP ext folder. As mine is.
D:\php5\ext folder. for PHP loading Php_memcache.dll
3, Configuration PHP.ini
Add a line Extension=php_memcache.dll on C:\windows\php.ini to be able, (position is in
Extension=php_mbstring.dll These extensions are available in the following add-on locations)
4. Start IIS again, and then look at the phpinfo. Assuming there is a memcache, then the installation is successful!
Basic Settings for memcached:
-P Monitoring Port
-L connected IP address, default is native
-D Start memcached service
-D Restart Restart memcached service
-D Stop|shutdown Close the executing memcached service
-D Install memcached service
-d Uninstall Uninstall memcached service
-U executes as (only valid when root is executed)
-m maximum memory usage, in megabytes. Default 64MB
-M running out of memory and returning an error instead of deleting an item
-C Maximum same time connection number, default is 1024
-F Block size growth factor, default is 1.25
-N Minimum allocated space. Key+value+flags default is 48
-H Display Help
memcache Environment Test :
Execute the following PHP file. Assume that there is an output of this is a test!. It means that the environment is built successfully.
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); $val = $me M->get (' key '); Echo $val; >
How to install Memcache in the Windows system IIS Environment