cd memcached-1.4.15
./configure
make
make install
memcached -m 50M -d -u root
[root@desktop7 Desktop]# telnet 192.168.0.104 11211
Trying 192.168.0.104... Connected to 192.168.0.104. Escape character is '^]'. add user1 0 0 5 12345 STORED get user1 VALUE user1 0 5 12345 END set user1 0 0 7 1234567 STORED get user1 VALUE user1 0 7 1234567 END delete user1 DELETED get user1
END
网页管理
cd memcached-1.4.15
cp memcache.php /usr/local/lanmp/nginx/html/
vim memcache.php
编辑这个文件
$VERSION='$Id: memcache.php,v 1.2 2008/09/11 19:21:06 mikl Exp $';define('ADMIN_USERNAME','
memcache'); // Admin Username //登录网页管理的用户名 define('ADMIN_PASSWORD','
westos'); // Admin Password //密码 define('DATE_FORMAT','Y/m/d H:i:s'); define('GRAPH_SIZE',200); define('MAX_ITEM_DUMP',50); #$MEMCACHE_SERVERS[] = 'mymemcache-server1:11211'; // add more as an array $MEMCACHE_SERVERS[] = '192.168.0.104:11211'; // add more as an array //这里指定的是memcache主机的ip地址