linux安装 memcached

本文详细介绍如何在Linux环境下安装Libevent和Memcached。首先,需要安装Libevent,通过./configure --prefix=/usr进行配置,然后执行make和make install完成安装。接着,安装Memcached时需指定Libevent的安装路径,同样进行配置、编译和安装。安装过程中可能遇到的共享库问题及解决方法也被提及。

核心步骤:wget下载libevent和memcached

1.先安装libevent。

配置时需要指定安装路径 即./configure --prefix=/usr;

然后make;然后make install;

2.安装memcached,配置时需要指定libevent的安装路径 即./configure --with-libevent=/usr

;然后make;然后make install;

1、环境准备 安装 memcached前提安装libevent

2、安装libevent 进入解压包根目录 cd libevent-1.4.11-stable/

检查安装环境 ./configure

安装 make make install

2、安装 memcached 进入解压包根目录

cd memcached-1.4.0/ ./configure make make install

3、安装memcache时,需要建立文件索引或者说文件连接(link) 如果建立出现 启动服务时出现 error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory

4. 启动 memcached /usr/local/bin/memcached -d -m 100 -l 195.203.56.35 -p 11211 -u root

5.验证可使用 telnet 195.203.56.35 11211

stats //开始

quite //退出

command[set/add/replace] key flags(0) time(0永远,单位秒) bytes value command[gets/delete] key

flush_all 清楚数据

转载于:https://www.cnblogs.com/atwanli/articles/4454184.html

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值