Chinaunix首页 | 论坛 | 博客
  • 博客访问: 602473
  • 博文数量: 103
  • 博客积分: 2269
  • 博客等级: 大尉
  • 技术积分: 1108
  • 用 户 组: 普通用户
  • 注册时间: 2011-09-23 16:32
文章分类

全部博文(103)

文章存档

2012年(61)

2011年(42)

分类: 服务器与存储

2012-07-11 13:14:03



1. 安装libevent

[root@localhost ~]# wget ~provos/libevent-2.0.13-stable.tar.gz
[root@localhost ~]# tar xzf libevent-2.0.13-stable.tar.gz
[root@localhost ~]# cd libevent-2.0.13-stable
[root@localhost libevent-2.0.13-stable]# ./configure
[root@localhost libevent-2.0.13-stable]# make
[root@localhost libevent-2.0.13-stable]# make install


2. 安装memcached

[root@localhost ~]# wget
[root@localhost ~]# tar xzf memcached-1.4.0.tar.gz
[root@localhost ~]# cd memcached-1.4.0
[root@localhost memcached-1.4.0]# ./configure
[root@localhost memcached-1.4.0]# make
[root@localhost memcached-1.4.0]# make install

3. 测试安装是否成功
[root@localhost memcached-1.4.0]# cd ~
[root@localhost ~]# memcached -u nobody -d -m 64 -p 11211
memcached: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory
[root@localhost memcached-1.4.0]# LD_DEBUG=libs memcached -v
     22253:     find library=libevent-2.0.so.5 [0]; searching
     22253:      search cache=/etc/ld.so.cache
     22253:      search path=/lib/tls/i686/sse2:/lib/tls/i686:/lib/tls/sse2:/lib/tls:/lib/i686/sse2:/lib/i686:/lib/sse2:/lib:/usr/lib/tls/i686/sse2:/usr/lib/tls/i686:/usr/lib/tls/sse2:/usr/lib/tls:/usr/lib/i686/sse2:/usr/lib/i686:/usr/lib/sse2:/usr/lib            (system search path)
     22253:       trying file=/lib/tls/i686/sse2/libevent-2.0.so.5
     22253:       trying file=/lib/tls/i686/libevent-2.0.so.5
     22253:       trying file=/lib/tls/sse2/libevent-2.0.so.5
     22253:       trying file=/lib/tls/libevent-2.0.so.5
     22253:       trying file=/lib/i686/sse2/libevent-2.0.so.5
     22253:       trying file=/lib/i686/libevent-2.0.so.5
     22253:       trying file=/lib/sse2/libevent-2.0.so.5
     22253:       trying file=/lib/libevent-2.0.so.5
     22253:       trying file=/usr/lib/tls/i686/sse2/libevent-2.0.so.5
     22253:       trying file=/usr/lib/tls/i686/libevent-2.0.so.5
     22253:       trying file=/usr/lib/tls/sse2/libevent-2.0.so.5
     22253:       trying file=/usr/lib/tls/libevent-2.0.so.5
     22253:       trying file=/usr/lib/i686/sse2/libevent-2.0.so.5
     22253:       trying file=/usr/lib/i686/libevent-2.0.so.5
     22253:       trying file=/usr/lib/sse2/libevent-2.0.so.5
     22253:       trying file=/usr/lib/libevent-2.0.so.5
     22253:
memcached: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory
[root@localhost ~]#

[root@localhost ~]# ls /usr/local/lib/libevent-*
/usr/local/lib/libevent-2.0.so.5  /usr/local/lib/libevent-2.0.so.5.1.2
[root@localhost ~]# ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib/libevent-2.0.so.5
[root@localhost ~]# ln -s /usr/local/lib/libevent-2.0.so.5.1.2 /usr/lib/libevent-2.0.so.5.1.2
[root@localhost ~]# memcached -u nobody -d -m 64 -p 11211
[root@localhost ~]# ps -ef|grep memcached
nobody   22279     1  0 12:47 ?        00:00:00 memcached -u nobody -d -m 64 -p 11211
root     22299 13689  0 12:47 pts/2    00:00:00 grep memcached
[root@localhost ~]#

阅读(1496) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~