Install Magent to/usr/local/
Cd/usr/local
mkdir magent
CD magent/
wget http://memagent.googlecode.com/files/magent-0.6.tar.gz
Tar zxvf magent-0.6.tar.gz
/sbin/ldconfig
Sed-i "s#libs =-levent#libs =-levent-lm#g" Makefile
Make
Error 1:
Gcc-lrt-wall-g-o2-i/usr/local/include-m64-c-o magent.o magent.c
magent.c:in function ' writev_list ':
Magent.c:729:error: ' Ssize_max ' undeclared (in the This function)
Magent.c:729:error: (Each undeclared identifier are reported only once
Magent.c:729:error:for each function it appears in.)
Make: * * * [MAGENT.O] Error 1
Solution:
VI ketama.h
Join at the beginning
#ifndef Ssize_max
# define Ssize_max 32767
#endif
Error 2:
Gcc-wall-g-o2-i/usr/local/include-m64-c-o magent.o magent.c
Gcc-wall-g-o2-i/usr/local/include-m64-c-o ketama.o ketama.c
Gcc-wall-g-o2-i/usr/local/include-m64-o magent MAGENT.O KETAMA.O/USR/LIB64/LIBEVENT.A/USR/LIB64/LIBM.A
/USR/LIB64/LIBEVENT.A (EVENT.O): in function ' gettime ':
(. text+0x449): Undefined reference to ' clock_gettime '
/USR/LIB64/LIBEVENT.A (EVENT.O): in function ' event_base_new ':
(. text+0x72a): Undefined reference to ' clock_gettime '
Collect2:ld returned 1 exit status
Make: * * * [magent] Error 1
Solutions
Vim Makefile
Cflags =-wall-g-o2-i/usr/local/include $ (M64)
To
Cflags =-lrt-wall-g-o2-i/usr/local/include $ (M64)
Error 3:centos 6
[Root@test magent]# make
Gcc-wall-g-o2-i/usr/local/include-m64-c-o magent.o magent.c
This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/tools/
Gcc-wall-g-o2-i/usr/local/include-m64-c-o ketama.o ketama.c
Gcc-wall-g-o2-i/usr/local/include-m64-o magent MAGENT.O KETAMA.O/USR/LIB64/LIBEVENT.A/USR/LIB64/LIBM.A
GCC:/usr/lib64/libm.a: No file or directory
Make: * * * * [magent] Error 1
Solutions
Ln-s/USR/LIB64/LIBM.SO/USR/LIB64/LIBM.A
Note: There may also be an error. GCC:/usr/lib64/libevent.a: No file or directory
If there is, executable
VI Makefile
Find LIBS =/USR/LIB64/LIBEVENT.A/USR/LIB64/LIBM.A
Modify the installation path for LIBS =/usr/libevent/LIBEVENT.A/USR/LIB64/LIBM.A
Example: LIBS =/USR/LIB/LIBEVENT.A/USR/LIB64/LIBM.A
See if Magent is installed successfully
CD usr/bin/magent./magent
Please provide-s "ip:port" argument
memcached Agent v0.6 build-date:oct 15 2012 16:12:30
Usage:
-H This message
-U UID
-G GID
-P port, default is 11211. (0 to disable TCP support)
-S Ip:port, set memcached server IP and port
-B ip:port, set backup memcached server IP and port
-l IP, local bind IP addresses, default is 0.0.0.0
-N number, set Max connections, default is 4096
-D don ' t go to background
-K Use Ketama key allocation algorithm
-f file, UNIX socket path to listen on. Default is Off
-I number, set Max keep alive connections for one memcached server, default is 20
-V Verbose
Author: csdn Blog Maple fluttering moment