HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Memcached supports many platforms: Linux, FreeBSD, Solaris, Mac OS, can also be installed on Windows.
Linux systems install memcached, first of all have to install libevent library.
sudo apt-get install libevent libevent-deve 自动下载安装(Ubuntu/Debian) yum install libevent libevent-deve 自动下载安装(Redhat/Fedora/Centos)
Ubuntu / Debian
sudo apt-get install memcached
Redhat / Fedora / Centos
yum install memcached
FreeBSD
portmaster databases/memcached
Memcached download the latest version of its official website (http://memcached.org/).
wget #latest 下载最新版本 tar -zxvf memcached-1.x.x.tar.gz 解压源码 cd memcached-1.x.x 进入目录 ./configure --prefix=/usr/local/memcached 配置 make && make test 编译 sudo make install 安装
Memcached command is run:
$ /usr/local/memcached/bin/memcached -h 命令帮助
Note: If you use the automatic install memcached command is located in/ usr / local / bin / memcached .
Startup options:
Enter the following command from the terminal, start memcached:
/usr/local/memcached/bin/memcached -p 11211 -m 64m -vv slab class 1: chunk size 88 perslab 11915 slab class 2: chunk size 112 perslab 9362 slab class 3: chunk size 144 perslab 7281 中间省略 slab class 38: chunk size 391224 perslab 2 slab class 39: chunk size 489032 perslab 2 <23 server listening <24 send buffer was 110592, now 268435456 <24 server listening (udp) <24 server listening (udp) <24 server listening (udp) <24 server listening (udp)
This shows the debug information. This starts in the foreground of memcached, listening on TCP port 11211, the maximum memory usage for the 64M. Much information about the debugging information is stored.
# /usr/local/memcached/bin/memcached -p 11211 -m 64m -d
or
/usr/local/memcached/bin/memcached -d -m 64M -u root -l 192.168.0.200 -p 11211 -c 256 -P /tmp/memcached.pid