cd libevent-2.1.8-stable ./configure make make install
然后切换到 memcached 目录
执行
./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/lib/ make make install
报错
[root@memcached memcached-1.5.6]# /usr/local/memcached/bin/memcached -h /usr/local/memcached/bin/memcached: errorwhile loading shared libraries: libevent-2.1.so.6: cannot open shared object file: No such file or directory
[root@memcached lib]# /usr/local/memcached/bin/memcached -h memcached 1.5.6 -p, --port=<num> TCP port to listen on (default: 11211) -U, --udp-port=<num> UDP port to listen on (default: 11211, 0 is off) -s, --unix-socket=<file> UNIX socket to listen on (disables network support) -A, --enable-shutdown enable ascii "shutdown" command -a, --unix-mask=<mask> access mask for UNIX socket, in octal (default: 0700) -l, --listen=<addr> interface to listen on (default: INADDR_ANY) -d, --daemon run as a daemon -r, --enable-coredumps maximize core file limit -u, --user=<user> assume identity of <username> (only when run as root) -m, --memory-limit=<num> item memory in megabytes (default: 64 MB) -M, --disable-evictions return error on memory exhausted instead of evicting -c, --conn-limit=<num> max simultaneous connections (default: 1024) -k, --lock-memory lock down all paged memory -v, --verbose verbose (print errors/warnings while in event loop) -vv very verbose (also print client commands/responses) -vvv extremely verbose (internal state transitions) -h, --help print this help and exit -i, --license print memcached and libevent license -V, --version print version and exit -P, --pidfile=<file> save PID in <file>, only used with -d option -f, --slab-growth-factor=<num> chunk size growth factor (default: 1.25) -n, --slab-min-size=<bytes> min space used for key+value+flags (default: 48) -L, --enable-largepages try to use large memory pages (if available) -D <char> Use <char> as the delimiterbetween key prefixes and IDs. This is used for per-prefix stats reporting. The defaultis ":" (colon). If this optionis specified, stats collection is turned on automatically; ifnot, then it may be turned on by sending the "stats detail on" command to the server. -t, --threads=<num> number of threads to use (default: 4) -R, --max-reqs-per-event maximum number of requests per event, limits the requests processed per connectionto prevent starvation (default: 20) -C, --disable-cas disable use of CAS -b, --listen-backlog=<num> set the backlog queue limit (default: 1024) -B, --protocol=<name> protocol - one of ascii, binary, or auto (default) -I, --max-item-size=<num> adjusts max item size (default: 1mb, min: 1k, max: 128m) -F, --disable-flush-all disable flush_all command -X, --disable-dumping disable stats cachedump and lru_crawler metadump -o, --extended comma separated list of extended options most options have a 'no_' prefix todisable - maxconns_fast: immediately closenew connections afterlimit - hashpower: an integer multiplier for how large the hash table should be. normally grows at runtime. set based on "STAT hash_power_level" - tail_repair_time: timein seconds for how long to wait before forcefully killing LRU tail item. disabled bydefault; very dangerous option. - hash_algorithm: the hash table algorithm defaultis murmur3 hash. options: jenkins, murmur3 - lru_crawler: enable LRU Crawler background thread - lru_crawler_sleep: microseconds to sleep between items defaultis100. - lru_crawler_tocrawl: max items to crawl per slab per run defaultis0 (unlimited) - lru_maintainer: enablenew LRU system + background thread - hot_lru_pct: pct of slab memory to reserve for hot lru. (requires lru_maintainer) - warm_lru_pct: pct of slab memory to reserve for warm lru. (requires lru_maintainer) - hot_max_factor: items idle > cold lru age * dropfrom hot lru. - warm_max_factor: items idle > cold lru age * this dropfrom warm. - temporary_ttl: TTL's below get separate LRU, can't be evicted. (requires lru_maintainer) - idle_timeout: timeout for idle connections - slab_chunk_max: (EXPERIMENTAL) maximum slab size. use extreme care. - watcher_logbuf_size: size in kilobytes of per-watcher write buffer. - worker_logbuf_size: size in kilobytes of per-worker-thread buffer readby background thread, then written to watchers. - track_sizes: enable dynamic reports for'stats sizes' command. - no_inline_ascii_resp: save up to24 bytes per item. small perf hit in ASCII, no perf difference in binary protocol. speeds up all sets. - no_hashexpand: disables hash table expansion (dangerous) - modern: enables options which will be defaultin future. currently: nothing - no_modern: uses defaults of previous major version (1.4.x)