CentOS installation memcached

Source: Internet
Author: User

CentOS installation memcached

1. Installation dependency: Libevent
Yum Install Libevent-devel

2. Get the latest version
wget Http://memcached.org/latest-O memcached

3. Unzip
TAR-ZXVF memcached

4. Go to the catalogue, my current version is 1.4.30
CD memcached-x.x.x

5. Generate the Makefile file
./configure

6. Compiling
Make

7. Compiling tests
Make Test

8. Back up the memcached to the/usr/local/bin directory
Make install

9. Start
/usr/local/bin/memcached-d-M 120-p 10000-u www-l 127.0.0.1-m-C 100


Note: If you do not have the-u user, you will be reported:
Can ' t run as root without the-u switch

memcached Startup parameters:
-P Specify port number (default 11211)
-U <num> UDP Listening port (default: 11211, 0 o'clock off)
-S <file> UNIX socket path for listening (disable network support)
-A <mask> UNIX socket access mask, octal digits (default: 0700)
-m specifies the maximum amount of memory to use (default 64MB)
-T thread count (default 4)

-L <ip_addr> Bind address (default: All allowed, regardless of internal or external network or local replacement IP, there is a security risk, if set to 127.0.0.1 can only be native access)
-D Start memcached service
-D Restart Restart memcached service
-D Stop|shutdown Close the running memcached service
-U <username> bind use specified for Run process <username> (only the root user can use this parameter)
-P <file> writes the PID to the file <file&gt, which enables fast process termination behind and needs to be used with-D
-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 <bytes> Minimum allocated space, key+value+flags default is 48

-K locks all memory pages. Note that you can lock the upper memory limit.
Attempts to allocate more memory fail, so be aware of the user-assignable memory limit that is used when the daemon is started.
(Not the front-u <username> parameter; under SH, use the command "ulimit-s-L num_kb" to set.) )
-V Prompt message (Error/warning information is printed in the event loop.) )
-VV details (also print client commands/responses)
-VVV Super Details (also prints changes in the internal state)
-H Print this help message and exit.
-I print licenses for memcached and Libevent.
-L attempts to use a large memory page, if available. Increasing the memory page size can reduce the number of page table buffer (TLB) misses and improve operational efficiency.
In order to get a large memory page from the operating system, memcached will assign all data items to a large chunk.
-D <char> use <char> as a delimiter for prefixes and IDs.
This is used to get status reports by prefix. The default is ":" (colon).
If this parameter is specified, the state collection is automatically turned on, and if not specified, the command "stats detail on" is required to open.
-T <num> number of threads Used (default: 4)
-R The maximum number of requests that can be processed per connection.
-C disables CAs.
-B Set the length of the background log queue (default: 1024)
-B Binding Protocol-possible value: Ascii,binary,auto (default)
-I overrides each data page size. Adjusts the maximum size of the data item.

CentOS installation memcached

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.