由于安装memcached时要用到libevent故要先装
下载地址:
一、
wget ~provos/libevent-1.4.11-stable.tar.gz
tar -zxvf libevent-1.4.11-stable.tar.gz
cd libevent-1.4.11-stable
./configure
make && make install
二、
wget
tar -zxvf memcached-1.2.6.tar.gz
cd memcached-1.2.6
./configure --prefix=/usr/local/memcached
make && make install
启动:
/usr/local/memcached/bin/memcached -d -u daemon -m 1024 -p 11211 -P /tmp/memcached.pid
memcached选项:
memcached 1.2.6
-p TCP port number to listen on (default: 11211)
-U UDP port number to listen on (default: 0, off)
-s unix socket path to listen on (disables network support)
-a access mask for unix socket, in octal (default 0700)
-l interface to listen on, default is INDRR_ANY
-d run as a daemon
-r maximize core file limit
-u assume identity of (only when run as root)
-m max memory to use for items in megabytes, default is 64 MB
-M return error on memory exhausted (rather than removing items)
-c max simultaneous connections, default is 1024
-k lock down all paged memory. Note that there is a
limit on how much memory you may lock. Trying to
allocate more than that would fail, so be sure you
set the limit correctly for the user you started
the daemon with (not for -u user;
under sh this is done with 'ulimit -S -l NUM_KB').
-v verbose (print errors/warnings while in event loop)
-vv very verbose (also print client commands/reponses)
-h print this help and exit
-i print memcached and libevent license
-b run a managed instanced (mnemonic: buckets)
-P save PID in , only used with -d option
-f chunk size growth factor, default 1.25
-n minimum space allocated for key+value+flags, default 48
阅读(1514) | 评论(0) | 转发(0) |