1 wget https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz 2 tar -zxvf libevent-2.0.22-stable.tar.gz 3 cd libevent-2.0.22-stable 4 mkdir /usr/local/libevent 5 ./configure --prefix=/usr/local/libevent 6 make && make install
1 wget http://memcached.org/files/memcached-1.4.31.tar.gz 2 tar -zxvf memcached-1.4.31.tar.gz 3 cd memcached-1.4.31 4 mkdir /usr/local/memcached 5 ./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent 6 make && make install
1 mkdir /usr/local/magent 2 cd /usr/local/magent 3 wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/memagent/magent-0.6.tar.gz 4 tar -zxvf magent-0.6.tar.gz && rm -rf magent-0.6.tar.gz 5 /sbin/ldconfig 6 sed -i "s#LIBS = -levent#LIBS = -levent -lm#g" Makefile
1 ifeq ($(ARCH), $(X64)) 2 M64 = -m64 3 LIBS = /usr/lib64/libevent.so /usr/lib64/libm.so 4 else 5 LIBS = -levent -lm -L/usr/local/libevent/lib 6 endif
1 #ifndef SSIZE_MAX 2 #define SSIZE_MAX 32767 3 #endif 4 #ifndef _KETAMA_H 5 #define _KETAMA_H 6 ..........
1 make 2 ln -i /usr/local/magent/magent /usr/bin/magent
1 #memcached 啟動 2 memcached -d -m 10240 -u root -c 30720 -p 11211 -P /tmp/memcached.pid 3 #magent 啟動 4 magent -u root -n 102400 -p 12000 -s 192.168.0.1:11211 -s 192.168.0.2:11211
http://xxxxxx/Linuxjc/1154582.html TechArticle