memcached源代码阅读笔记(5)memcached1.4.10 libevent2.0.16在centos安装
2011-12-08 19:37
405 查看
memcached1.4.10安装
操作系统:CENTOS5.6
安装libevent
mkdir libevent
cd libevent
下载libevent2.0.16
wget --no-check-certificate https://github.com/downloads/libevent/libevent/libevent-2.0.16-stable.tar.gz
或者
通过浏览器下载后通过rz拿到服务器
安装rz,sz工具
yum -y install lrzsz
rz
tar xzvf libevent-2.0.16-stable.tar.gz
cd libevent-2.0.16-stable
./configure --prefix=/usr/local/libevent
如果出错:configure: error: in `..libevent-2.0.16-stable':
configure: error: no acceptable C compiler found in $PATH
说明没有安装 gcc,
安装gcc
#yum -y install gcc
#yum search gcc
#yum -y install gcc-c++
# make
# make install
# getconf LONG_BIT
cd memcached/
cd memcached-1.4.10
./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent
make
make install
/usr/local/memcached/bin/memcached -d -m 64 -u root -p 11211 -c 256 -P /tmp/memcached.pid
ps aux | grep memcached
/usr/local/memcached/bin/memcached –p 11211 –m 64 -u root –vv
之前介绍的是单线程的方式,因为接下来要研究多线程的处理过程,因此需要配置成多线程的版本。
如果是memcached比较老的版本,缺省是单线程,因此编译的时候需要做如下配置,加上
--enable-threads 选项
./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent --enable-threads
但是memcached1.4以后的版本如果再用这个选项就会报警告:
configure: WARNING: unrecognized options: --enable-threads
因为新的版本缺省就是多线程
可以在启动的时候指定t参数,后面指定线程数。通常为cpu核数
/usr/local/memcached/bin/memcached –p 11211 –m 64 -uroot -t2 -vv
如果要单线程方式,指定t为1即可。
/usr/local/memcached/bin/memcached –p 11211 –m 64 -uroot -t1 -vv
操作系统:CENTOS5.6
安装libevent
mkdir libevent
cd libevent
下载libevent2.0.16
wget --no-check-certificate https://github.com/downloads/libevent/libevent/libevent-2.0.16-stable.tar.gz
或者
通过浏览器下载后通过rz拿到服务器
安装rz,sz工具
yum -y install lrzsz
rz
tar xzvf libevent-2.0.16-stable.tar.gz
cd libevent-2.0.16-stable
./configure --prefix=/usr/local/libevent
如果出错:configure: error: in `..libevent-2.0.16-stable':
configure: error: no acceptable C compiler found in $PATH
说明没有安装 gcc,
安装gcc
#yum -y install gcc
#yum search gcc
#yum -y install gcc-c++
# make
# make install
# getconf LONG_BIT
cd memcached/
cd memcached-1.4.10
./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent
make
make install
/usr/local/memcached/bin/memcached -d -m 64 -u root -p 11211 -c 256 -P /tmp/memcached.pid
ps aux | grep memcached
/usr/local/memcached/bin/memcached –p 11211 –m 64 -u root –vv
之前介绍的是单线程的方式,因为接下来要研究多线程的处理过程,因此需要配置成多线程的版本。
如果是memcached比较老的版本,缺省是单线程,因此编译的时候需要做如下配置,加上
--enable-threads 选项
./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent --enable-threads
但是memcached1.4以后的版本如果再用这个选项就会报警告:
configure: WARNING: unrecognized options: --enable-threads
因为新的版本缺省就是多线程
可以在启动的时候指定t参数,后面指定线程数。通常为cpu核数
/usr/local/memcached/bin/memcached –p 11211 –m 64 -uroot -t2 -vv
如果要单线程方式,指定t为1即可。
/usr/local/memcached/bin/memcached –p 11211 –m 64 -uroot -t1 -vv
相关文章推荐
- memcached源代码阅读笔记(6)memcached1.4.10 在linux平台多线程模型研究
- memcached 源代码阅读笔记(4)- SET 操作分析
- memcached源代码阅读笔记(二):网络处理部分
- memcached源代码阅读笔记(一)
- CentOS 7运维管理笔记(5)----源代码安装Apache 2.4,搭建LAMP服务器
- Memcached 笔记与总结(1)Linux(CentOS 6.6) 和 Windows(7)下安装与配置 Memcached (1.4.24)与 Memcached 基础命令
- 长平狐 memcached源代码阅读笔记(二):网络处理部分
- CentOS 4.5 OpenLDAP安装笔记
- CentOS6.3编译安装Memcached集群分布式缓存代理Magent-0.6出错汇总
- 【Centos7笔记九】samba服务器的安装使用
- (6)CentOS 7最小化安装后找不到‘ifconfig’命令——修复小提示---学习笔记
- 安装memcached:error while loading shared libraries: libevent-1.4.so.2
- CentOS6.2下一步一步源代码安装OpenStack(一)操作系统准备
- centos 安装 memcached
- Memcached笔记——(一)安装&常规错误&监控
- 学习笔记1——Linux(CentOS)在虚拟机上最小化安装之后的网络配置及其与主机的连接
- 学习过程中整理的有关centos的一些安装笔记
- CentOS下安装Memcached
- CentOS 安装笔记
- CentOS学习笔记(一):中文语言包及输入法的安装使用