Eighty: Installation and parameters of memcached

 

Memcached is a high concurrent memory key-value cache system, its main role is to calculate the results of a database query results, content, and other time-consuming cache to system memory, thus speeding up the response speed of Web applications.

Official website: http://memcached.org/

As the official website only version of linux download, so we need another version of the collection window

http://downloads.northscale.com/memcached-1.4.5-x86.zip
http://downloads.northscale.com/memcached-win64-1.4.4-14.zip

https://www.runoob.com/memcached/window-install-memcached.html

 

installation:

win

 

Installation: memcached.exe -d install
start: memcached.exe -d start
closed: memcached.exe -d stop

 

 

centos version

yum install libevent libevent-devel

yum install memcached

Start: systemctl start memcached.service start or locate the file: / usr / bin / memcached -u memcached -d start

 

Try to use it

 

If you want to specify the parameters, you can not use systemctl start memcached.service start, use the / usr / bin / memcached to run, such as: / usr / bin / memcached -u memcached -m 1024 -p 11222 start

-m specifies the maximum amount of memory used by the cache, the unit is Megabytes, the default is 64MB
-u only when run as root specify the parameters
-d run as daemon of
-l specifies the address to listen, if it is through systemctl start memcached .service start, the default can only be connected to this unit if you want to allow other machines connected, set to 0.0.0.0
-p listening TCP port number specified, the default is 11211

other commonly used parameters
specified number of threads -t, default is 4 a
-h prints help information
-c maximum number of simultaneous connections, the default is 1024.
-U listening UDP port number specified, the default is 11211
error when -M memory exhaustion, rather than deleting entries

beginning that the "-d" parameters that need to be further explained
-d install install memcached
-d uninstall uninstall memcached
-d start to start memcached service
-d restart to restart the memcached service
-d stop stop service memcached
-d shutdown stop memcached service

 

Guess you like

Origin www.cnblogs.com/zhongyehai/p/11878117.html