CentOS下安装memcached(yum 方式)

服务器环境:CentOS 5
人比较懒,所以用yum方式安装.命令行下执行
# yum install memcached
报错:
rpmdb: Lock table is out of available locker entries
rpmdb: Unknown locker ID: b7d
error: db4 error(22) from db->close
rpm 包管理器挂了。
运行以下命令修复
# cd /var/lib/rpm
# rm -rf __db.00*
# rpm --rebuilddb
好了,再次运行

# yum install memcached
更新速度慢得要死,所以,先装了一下 yum的镜像
# yum install fastestmirror
这下爽多了。
再执行
# yum install memcached
顺利装好 memcached
# rpm -qa|grep memcached
可以查看一下 memcached 版本号
启动 memcached
# memcached -d -u root
然后
# telnet localhost 11211
顺利出现
Escape character is '^]'.
运行命令
stats
STAT pid 21804
STAT uptime 7
STAT time 1266824945
STAT version 1.2.8
STAT pointer_size 64
STAT rusage_user 0.000000
STAT rusage_system 0.000999
STAT curr_items 0
STAT total_items 0
STAT bytes 0
STAT curr_connections 10
STAT total_connections 11
STAT connection_structures 11
STAT cmd_flush 0
STAT cmd_get 0
STAT cmd_set 0
STAT get_hits 0
STAT get_misses 0
STAT evictions 0
STAT bytes_read 7
STAT bytes_written 0
STAT limit_maxbytes 67108864
STAT threads 5
STAT accepting_conns 1
STAT listen_disabled_num 0
END

大功告成

你可能感兴趣的:(centos,memcached)