In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the cache server migration example analysis, the content is very detailed, interested friends can refer to, hope to be helpful to you.
What is Memcached?
In short, Memcached is an open source, high-performance, distributed caching system, memory-based key-value storage, used to store small chunks of arbitrary data (strings, objects).
Next, let's take a look at how to install Memcached on a Windows server.
Install Memcached
Download server memcached software
32bit: download memcached-win32-1.4.4-14.zip (directly below) containing 6 files, and place the unzipped folder anywhere (for example: d:\ memcached).
Memcached-win32-1.4.4-14.zip download page: http://blog.couchbase.com/memcached-144-windows-32-bit-binary-now-available
64bit: if you need the win64 version, download memcached-win64-1.4.4-14.zip (directly under). There are three files in it. Use these three files to overwrite the file with the same name under win32.
Memcached-win64-1.4.4-14.zip download page: http://blog.couchbase.com/memcached-windows-64-bit-pre-release-available
Run cmd.exe as an administrator
Run cmd.exe as an administrator and go to the folder where memcached is located
For example:
Cd D:\ memcached
Note: if you do not run as an administrator, you will get an error "failed to install service or service already installed"
Install memcached
D:\ memcached memcached.exe-d install
After that, there is no prompt on the screen, and you can view memcached in * * Control Panel * *-> * * Administrative tools * *-> * * Services * *.
Start memcached
Startup method 1:
D:\ memcached > memcached.exe-d start
After that, there is no prompt on the screen, but check "Show all user processes" in the Task Manager. At this time, you can see that the memcached.exe process is running the default port 11211. External access needs to open the port, otherwise you will not be able to connect successfully.
Startup method 2:
[control Panel]-> [Administrative tools]-> [Services] locate the memcached service, and double-click it to open the following figure
Startup type: select [automatic]
Service status: click [start] below
Note: some differences between the path of the executable file and the path I mentioned above can be ignored
Memcached basic parameter setting
-Port on which p listens
-l IP address of the connection. Default is local.
-d start starts the memcached service
-d restart restart memcached service
-d stop | shutdown shuts down the running memcached service
-d install install memcached service
-d uninstall uninstall the memcached service
-u runs as (valid only when running as root)
-m maximum memory usage, in MB. Default 64MB
-M returns an error when memory is exhausted instead of deleting an item
-c maximum number of simultaneous connections. Default is 1024.
-f block size growth factor, default is 1.25
-n minimum allocated space. Key+value+flags defaults to 48.
-h display help
When setting parameters, you need to stop memcached first, and then set it with the command line, such as:
D:\ memcached > memcached.exe-m 1-d start
Stop memcached
D:\ memcached > memcached.exe-d stop
Uninstall memcached
D:\ memcached > memcached.exe-d uninstall
Modify parameters
Under windows, you need to modify the registry information to set, open the registry, and find
HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Services\ memcached
There is a "ImagePath" entry with a value of:
"D:\ memcached\ memcached.exe"-d runservice
Add "- m 1024-c 2048-p 11210" after the end. Just wait. Effective after restarting the service
After installing Memcached, migrate the cached data from Redis to Memcached, and change the connection Redis information in the project to connect to Memcached.
On the cache server migration example analysis is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.