memcached compile installation and simple operation

Source: Internet
Author: User
Tags cas memcached

memcached cheap installation needs to rely on

Yum-y Install libevent-devel PHP open memcached extension needs to rely on Libmemcached-devel

./configure--prefix= Path--enable-64bit

Make && make install

Pecl install memcached in the bin directory of PHP

memecached start

./memcached-d-c1024-m 64m-u Nobody

-D Daemon Mode

-M allocated to memcached using memory space default unit m

-U memcached Users

The IP address of the-L listener service

-P Boot Port

-C Maximum concurrency default 1024

-P PID Storage Path

Connecting to memcached:  requires installing the Telnet tool yum-y install telnettelnet IP port, such as Telnet 192.168.100.11 11211stats view status, Flush_all: Clear cache to view the memcached status of the basic command, through this command can see the following information: STAT PID 22459                             process Idstat uptime 1027046                         Server run seconds stat time 1273043062                       Server Current UNIX timestamp stat version 1.4.4                         Server version stat Pointer_size                       operating system word size (this server is 64-bit) STAT Rusag E_user 0.040000                   Process Cumulative User Time stat Rusage_system 0.260000   & nbsp             Process cumulative system time stat curr_connections                   Current Open Connections StAt Total_connections                   The total number of connections that have been opened stat Connection_structures 1 3               Server-Allocated connection structure stat Cmd_get  ,           &NB Sp               Execute get command count stat cmd_set                             Execute SET command count stat Cmd_flush 3                           point to Flush_all total number of commands stat get_hits 9                            get hit count stat get_misses             &NBSP ;           Get misses stat delete_misses 5                 &N Bsp     Delete misses stat delete_hits 1                       nbsp Delete LifeFrequency stat incr_misses 0                         INCR misses stat in Cr_hits 0                           INCR number of hits stat Decr_mis SES 0                         DECR number of misses stat decr_hits 0                           DECR hit count stat cas_misses 0   &nbs P                      cas number of misses stat cas_hits 0       & nbsp                    cas hit count stat cas_badval 0                           Use wipe count stat auth_cmds 0STAT auth_errors 0STAT bytes_read 1578 5                       Read Bytes total stat bytes_written 15222                  Write bytes total stat limit_maxbytes 1048576             &NBS p; Amount of memory allocated (bytes) Stat Accepting_conns 1                     Current number of links received stat list En_disabled_num 0                stat Threads 4                             Number of threads stat conn_yields 0STAT bytes 0       &NB Sp                       Store Item bytes Stat Curr_items 0     &NBS P                    item number stat total_items                        item Total stat evictions 0             & nbsp             The total number of deleted item for get space   Another example: Start/End memcached-d-M 10-u root-l 192.168.0.122-p 1 1200-C 256 The-p/tmp/memcached.pid-d option is to start a daemon,-M is the amount of memory allocated to Memcache, in megabytes, where 10mb-u is the user running memcache, here is Root-l is the server IP address of the listener, If there are more than one address, this specifies the server's IP address 192.168.0.122-p is set memcache listening port, here set 12000, preferably more than 1024 port-C option is the maximum number of concurrent connections, the default is 1024, here set 256 , according to the load of your server to set-P is set to save memcache pid file Kill ' Cat/tmp/memcached.pid '   get run status echo stats | NC 192.168.1.123 11200watch "echo Stats | NC 192.168.1.123 11200 "(real-time status)

Memcached compile installation and simple actions

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.