Install Memcached under Window
The Memcached Window platform installation package is not provided on the official website. We can use the following link to download it. You need to click the corresponding link to download according to your system platform and required version number:
32-bit system version 1.2.5: http://static.php.cn/download/memcached-1.2.5-win32-bin.zip
32-bit system version 1.2.6: http://static.php.cn/download/memcached-1.2.6-win32-bin.zip
32-bit system version 1.4.4: http://static.php.cn/download/memcached-win32-1.4.4-14.zip
64-bit system version 1.4.4: http://static.php.cn/download/memcached-win64-1.4.4-14.zip
32-bit system version 1.4.5: http://static.php.cn/download/memcached-1.4.5-x86.zip
64-bit system version 1.4.5: http://static.php.cn/download/memcached-1.4.5-amd64.zip
Before version 1.4.5, memcached could be installed as a service, but this feature was deleted in versions 1.4.5 and later. Therefore we introduce two different versions below Different installation methods for 1.4.4 and 1.4.5:
memcached <1.4.5 version installation
1. Unzip the downloaded installation package to the specified directory.
2. Before version 1.4.5, memcached can be installed as a service. Run the following command with administrator privileges:
c:\memcached\memcached.exe -d install
Note: You need to use the real path Replaces c:\memcached\memcached.exe.
3. Then we can use the following command to start and shut down the memcached service:
c:\memcached\memcached.exe -d start c:\memcached\memcached.exe -d stop
4. If you want to modify the configuration items of memcached, you can execute regedit.exe in the command line command opens the registry and finds "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\memcached" to modify it.
If you want to provide the cache configuration used by memcached, you can modify ImagePath to:
"c:\memcached\memcached.exe" -d runservice -m 512
-m 512, which means to set the maximum cache configuration of memcached to 512M.
In addition, we can also view more parameter configurations by using the "c:\memcached\memcached.exe -h" command.
5. If we need to uninstall memcached, we can use the following command:
c:\memcached\memcached.exe -d uninstall
memcached >= 1.4.5 version installation
1. Unzip the downloaded installation package to the specified directory.
2. After memcached version 1.4.5, memcached cannot run as a service. You need to use the task schedule to start an ordinary process and set memcached to automatically execute when the window starts.
We use the administrator identity to execute the following command to add memcached to the task schedule:
schtasks /create /sc onstart /tn memcached /tr "'c:\memcached\memcached.exe' -m 512"
Note: You need to use the real path instead of c:\memcached\memcached.exe .
Note: -m 512 means setting the maximum cache configuration of memcached to 512M.
Note: We can view more parameter configurations by using the "c:\memcached\memcached.exe -h" command.
3. If you need to delete the memcached task plan, you can execute the following command:
schtasks /delete /tn memcached