To use Memcached in Windows, you must first download Memcached for Win32 installation.
Download address: http://jehiah.cz/projects/memcached-win32/
After unzipping, just enter the following command c:memcachedmemcached.exe -d install in the command window to install memcached as a Windows service.
After starting the service, the memcached service occupies 11211 port by default, and the maximum memory occupied by default is 64M.
I encountered some problems when modifying these two configuration options, and I searched a lot of information on the Internet, and they all said that I could start the service with the following command:
c:memcachedmemcached.exe -p 12345 -m 1024 -d start, -p indicates the port to be modified, and -m indicates the maximum memory occupied (in M).
But no matter how I called this command, I found that the port was still 11211.
When I opened the Windows Service Control Panel, I found that the server startup parameters installed by default memcached.exe did not write -p -m parameters at all, only 1 -d runservice parameter. So no matter what command you use to start the service, it's useless, see the figure below:
So I thought of directly modifying the startup parameters of the Windows service, the operation is as follows, open the registry, and find: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesmemcached Server The value of the ImagePath item is: "c:memcachedmemcached.exe" -d runservice Changed to "c:memcachedmemcached.exe" -p 12345 -m 128 -d runservice After saving, restart the memcached service, and then type netstat -n -a in the command line to see if the port has been changed now. ^_^
win8 64-bit operating system registry HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\memcached Other system self-tests!
|