标签:
[lizhiwei@localhost libevent]$ tar -zxvf libevent-2.0.22-stable.tar.gz
[lizhiwei@localhost Memcached]$ tar -zxvf memcached-1.4.24.tar.gz
[lizhiwei@localhost libevent-2.0.22-stable]$ cd /home/lizhiwei/SoftWare/libevent/libevent-2.0.22-stable
[lizhiwei@localhost libevent-2.0.22-stable]$ ./configure -prefix=/home/lizhiwei/InstallSoft/libevent
[lizhiwei@localhost libevent-2.0.22-stable]$ make
[lizhiwei@localhost libevent-2.0.22-stable]$ make install
[lizhiwei@localhost libevent-2.0.22-stable]$ cd /home/lizhiwei/SoftWare/Memcached/memcached-1.4.24
[lizhiwei@localhost memcached-1.4.24]$ ./configure -prefix=/home/lizhiwei/InstallSoft/memcached -with-libevent=/home/lizhiwei/InstallSoft/libevent/
[lizhiwei@localhost memcached-1.4.24]$ make
[lizhiwei@localhost memcached-1.4.24]$ make install
[lizhiwei@localhost memcached]$ cd /home/lizhiwei/InstallSoft/memcached/bin/
[lizhiwei@localhost bin]$ ll
total 356
-rwxr-xr-x. 1 lizhiwei lizhiwei 360894 Oct 1 20:52 memcached
[lizhiwei@localhost bin]$ ./memcached -d -m 10 -u lizhiwei -l 127.0.0.1 -p 12000 -c 256 -P /tmp/memcached.pid
[lizhiwei@localhost bin]$ ps -ef | grep memcached
lizhiwei 24004 1 0 20:59 ? 00:00:00 ./memcached -d -m 10 -u lizhiwei -l 127.0.0.1 -p 12000 -c 256 -P /tmp/memcached.pid
lizhiwei 24018 14869 0 21:00 pts/2 00:00:00 grep memcached
[lizhiwei@localhost bin]$ cat /tmp/memcached.pid
24004
[lizhiwei@localhost bin]$
[lizhiwei@localhost bin]$ ps -ef | grep memcached
lizhiwei 24004 1 0 20:59 ? 00:00:00 ./memcached -d -m 10 -u lizhiwei -l 127.0.0.1 -p 12000 -c 256 -P /tmp/memcached.pid
lizhiwei 24069 14869 0 21:07 pts/2 00:00:00 grep memcached
[lizhiwei@localhost bin]$ kill -9 24004
[lizhiwei@localhost bin]$ ps -ef | grep memcached
lizhiwei 24072 14869 0 21:07 pts/2 00:00:00 grep memcached
[lizhiwei@localhost bin]$
[lizhiwei@localhost ~]$ telnet 127.0.0.1 11211
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is ‘^]‘.
set name 0 64 5
abcde
STORED
get name
VALUE name 0 5
abcde
END
quit
Connection closed by foreign host.
[lizhiwei@localhost ~]$
标签:
原文地址:http://www.cnblogs.com/LiZhiW/p/4852103.html