Install Memcached in UbuntuServer

Source: Internet
Author: User
Install Memcached under UbuntuServer and enter sudoapt-getinstallmemcache. If the system cannot find the memcache installation package to update the software source, you can use any source image in the following list as long as it is directed to your/etc/apt/sources. add a line in the list file as follows: Install Memcached under deb Ubuntu Server, enter
  1. Sudo apt-get install memcache
If the system cannot find the memcache installation package
Update Software Source
You can use any source image in the following list to add a line to your/etc/apt/sources. list file as follows:
  1. Deb http:// Security.ubuntu.com/ubuntu hard-security main universe
Reinstallation
  1. Sudo apt-get update
  2. Sudo apt-get install memcache
Check whether the installation is successful.
-----
1. After the installation is successful, memcache starts itself. Check the process
  1. Ps-aux
A record is found.
  1. /Usr/bin/memcached-m64-P11211-U nobody-l127.0.0.1

Memcached port 11211 user nobody address 127.0.0.1 is displayed.

2. Connect to the memcached Server

  1. Telnet127.0.0.1 11211
Enter
  1. Stats
The parameters of the current memcached are displayed ..
  1. Sysadmin@ Ubuntu:/Etc/apt $ telnet127.0.0.1 11211
  2. Trying127.0.0.1...
  3. Connected127.0.0.1.
  4. Escape character is'^]'.
  5. Stats
  6. STAT pid3065
  7. STAT uptime170
  8. STAT time1334121278
  9. STAT version1.4.7
  10. STAT libevent2.0.12-Stable
  11. STAT pointer_size64
  12. STAT rusage_user0.004000
  13. STAT rusage_system0.000000
  14. STAT curr_connections5
  15. STAT total_connections7
  16. STAT connection_structures6
  17. STAT cmd_get0
  18. STAT performance_set0
  19. STAT pai_flush0
  20. STAT get_hits0
  21. STAT get_misses0
  22. STAT delete_misses0
  23. STAT delete_hits0
  24. STAT incr_misses0
  25. STAT incr_hits0
  26. STAT decr_misses0
  27. STAT decr_hits0
  28. STAT cas_misses0
  29. STAT cas_hits0
  30. STAT cas_badval0
  31. STAT auth_cmds0
  32. STAT auth_errors0
  33. STAT bytes_read140
  34. STAT bytes_written856
  35. STAT limit_maxbytes67108864
  36. STAT accepting_conns1
  37. STAT listen_disabled_num0
  38. STAT threads4
  39. STAT conn_yields0
  40. STAT bytes0
  41. STAT curr_items0
  42. STAT total_items0
  43. STAT evictions0
  44. STAT reclaimed0
  45. END
3. manually start memcached
  1. Memcached-d-m128-L127.0.0.1-P11211-U root
Start memcache with a root user allocated a maximum of 2 gm memory
  1. Memcached-d-m128-L127.0.0.1-P11212-U root

Start another memcache instance on port 11212.

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

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.