step1)
下载 libevent-1.3b.tar.gz, memcached-1.2.1.tar.gz
step2)安装libevent
error while loading shared libraries: libevent-1.3b.so.1: cannot open shared object file: No such file or directory
于是:
可以通过
下载 libevent-1.3b.tar.gz, memcached-1.2.1.tar.gz
step2)安装libevent
tar -xzvf libevent-1.3b.tar.gzstep2)安装memcached
cd libevent-1.3b
./configure --prefix=/usr/local/weip/libevent-1.3b
make && make install
tar -xzvf memcached-1.2.1.tar.gzstep3)启动
cd memcached-1.2.1
./configure --prefix=/usr/local/weip/memcached-1.2.1
这一步发生错误: If it's already installed, specify its path using --with-libevent=/dir/
于是使用下一个命令:
./configure --prefix=/usr/local/weip/memcached-1.2.1
-- with-libevent=/usr/local/weip/libevent-1.3b
make && make install
/usr/local/weip/memcached-1.2.1/bin/memcached -d -m 128 -l 192.168.100.231 -u root又发生错误:
error while loading shared libraries: libevent-1.3b.so.1: cannot open shared object file: No such file or directory
于是:
cp /usr/local/weip/libevent-1.3b/lib/* /usr/lib然后再启动,ok
可以通过
ps -efww|grep memcached看到:
root 18018 1 0 15:21 ? 00:00:00
/usr/local/weip/memcached-1.2.1/bin/memcached -d -m 128 -l
192.168.100.231 -u root
root 18020 15155 0 15:22 pts/2 00:00:00 grep memcached