One: Environment
Memcached is memcached-1.2.6-win32-bin, download link: http://www.jb51.net/softs/205838.html#down
TOMCAT6:
II: memcached Configuration
1, the installation of memcached
Unzip the installation package Memcached-1.2.6-win32-bin to the x:/directory and rename it to memcached.
Open a command prompt, enter the x:/memcached directory, enter the install command "memcached.exe–d Install", install the memcached Windows service,
Then enter "memcached-d start", after which memcached will start automatically each time a service is turned on for Windows.
Default port: 11211.
The following inserts describe some of the common names of memcached, and also the most basic commands,
(1) Check whether the Memcached service has been started: tasklist/fi "imagename eq memcached.exe"
(2) Introduction of memcached parameter usage
-P Listening Port
-L connected IP address, default is native
-D Start memcached service
-D Restart Restart memcached service
-D Stop|shutdown Close the running memcached service
-D Install memcached service
-d Uninstall Uninstall memcached service
-U Run as (only valid when running as root)
-m maximum memory usage, in megabytes. Default 64MB
-M running out of memory and returning an error 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 default is 48
-H Display Help
Example: C:\memcached\memcached.exe-h
Three: Tomcat configuration
1. Required JAR Package
such as the following list:
memcached-session-manager-1.6.1,
memcached-session-manager-tc7-1.6.1 (because Tomcat version is 7.0)
javolution-5.4.3.1,
msm-javolution-serializer-1.6.1 (Ready to use javolution serialization mode)
spymemcached-2.7.3 (Dependent package)
Configuration installation for 2.Tomcat
Extract and copy tomcat for apache-tomcat-7.0.55-01 and apache-tomcat-7.0.55-02, respectively
Modify the Server.xml file while adding HTTPS support and Tomcat dual-open configuration
To modify the file Tomcat/conf/context.xml, add the following code to the Context tab:
Built Nginx + Memcached + Tomcat cluster record