memcached相关

1,安装

  1)先安装libevent ,它是 memcached 所依赖的异步事件通知库.


  2)  安装memcached


2,开启

     ./memcached -d  - m 512 -l xxx.xxx.xxx.xxx -p 11211 -u root -P /var/rn/memcached.pid

表示:这会以守护程序的形式启动 memcached(-d),为其分配 512 内存(-m 512),并指定监听 localhost,端口 11211

3,使用

    telnet xxx.xxx.xxx.xxx

用 stats 命令查看

显示:

stats pid xxxx

stats uptime xxxx

....,表明是正确的。


4,关闭

kill -9 `/var/run/memcached`

查看下:netstat -anp | grep memcached

此时没了。


在安装的过程中出现了一些问题:

1,“configure: error: no acceptable C compiler found in $PATH”


没找到可用的C编译器,可能是GCC没装,装了GCC就行了搜索(如果已经装了,把路径加入PATH即可)

yum install gcc gcc-c++ autoconf automake


2, can't run as root without the -u switch

    这是因为在使用 ./memcached -d ...命令时未使用 -u root 

3,  telnet localhost 11211

     telnet:comment not found

yum install telnet 就好。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值