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
- 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:
- Deb http:// Security.ubuntu.com/ubuntu hard-security main universe
Reinstallation
- Sudo apt-get update
- Sudo apt-get install memcache
Check whether the installation is successful.
-----
1. After the installation is successful, memcache starts itself. Check the process
- Ps-aux
A record is found.
- /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
- Telnet127.0.0.1 11211
Enter
- Stats
The parameters of the current memcached are displayed ..
- Sysadmin@ Ubuntu:/Etc/apt $ telnet127.0.0.1 11211
- Trying127.0.0.1...
- Connected127.0.0.1.
- Escape character is'^]'.
- Stats
- STAT pid3065
- STAT uptime170
- STAT time1334121278
- STAT version1.4.7
- STAT libevent2.0.12-Stable
- STAT pointer_size64
- STAT rusage_user0.004000
- STAT rusage_system0.000000
- STAT curr_connections5
- STAT total_connections7
- STAT connection_structures6
- STAT cmd_get0
- STAT performance_set0
- STAT pai_flush0
- STAT get_hits0
- STAT get_misses0
- STAT delete_misses0
- STAT delete_hits0
- STAT incr_misses0
- STAT incr_hits0
- STAT decr_misses0
- STAT decr_hits0
- STAT cas_misses0
- STAT cas_hits0
- STAT cas_badval0
- STAT auth_cmds0
- STAT auth_errors0
- STAT bytes_read140
- STAT bytes_written856
- STAT limit_maxbytes67108864
- STAT accepting_conns1
- STAT listen_disabled_num0
- STAT threads4
- STAT conn_yields0
- STAT bytes0
- STAT curr_items0
- STAT total_items0
- STAT evictions0
- STAT reclaimed0
- END
3. manually start memcached
- Memcached-d-m128-L127.0.0.1-P11211-U root
Start memcache with a root user allocated a maximum of 2 gm memory
- 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