Build memcached in win8.1 (x64)
(1) memcached Installation File
Libgcc_s_sjlj-1.dll memcached.exe pthreadGC2.dll php_memcache.dll
(2) Installation Steps (Be sure to install the SDK with the administrator privilege)
1 put memcache.exe, libgcc_s_sjili-1.dll, pthreadGC2.dll in the php installation directory
2. Copy php_memcache.dll to the ext folder under the php installation directory, and add the following sentence to the end of the php. ini file:
Extension = php_memcache.dll
3. You can find cmd.exe in the C: \ Windows \ system32directory, right-click it and run it as an administrator. Go to your php Directory under the command line and run memcached-d install. If the installation is successful, no prompt is displayed,
If the installation fails or you have already installed it, you are not authorized to execute cmd.exe
4. start memcache, enter the PHP installation directory, execute memcached.exe-d start, and enable the memcache service.
5. Restart apache and use memcached in php.
(3) Use memcached in telnet. By default, win8.1 disables the telnet service. You can go to the control panel and choose program> enable or disable the windows function to check the telnet server and the telnet client, enter the dos interface and run
Telnet 127.0.0.1 11211, you can access the telnet window
(4) Common memcached commands
Memcached basic commands (installation, uninstallation, startup, and configuration ):
-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
For example, start
Memcached-d start
The memory of memcached is larger than 64 MB.
Memcached-m 256 m-d start
If you want to change the port
Memcached-d-m 30-l 127.0.0.1-p 9000-d start
Data Operation Command Format:
<Command name> <key> <flags> <exptime> <bytes>
<Data block>
For details about common commands, refer to this buddy's blog.
(5) Use memcached for php code. You can view the official documentation directly.