標籤:blog http os 使用 ar art html log sp
我的版本為Centos Release 5.3 (Final)
使用這個命令可以知道你的Linux版本
1、cat /etc/redhat-release
首先要安裝libevent庫。
cd /usr/local/src
curl -O http://monkey.org/~provos/libevent-1.4.10-stable.tar.gz
tar xzvf libevent-1.4.10-stable.tar.gz
cd libevent-1.4.10-stable
./configure –prefix=/usr/local【出現一個錯誤,應該是--。或者直接安裝在./configure】
make
make install
2、
接下來就是安裝memcached
【下載最新版的】
安裝mkdir magent
1.mkdir magent
2.cd magent/
3.wget http://memagent.googlecode.com/files/magent-0.5.tar.gz
4.tar zxvf magent-0.5.tar.gz
5./sbin/ldconfig
6.sed -i "s#LIBS = -levent#LIBS = -levent -lm#g" Makefile
7.make
8.cp magent /usr/bin/magent
9.cd ../
5、6、啟動
/usr/local/bin/memcached -d -m 10 -u root -l 10.232.74.204 -p 12000 -c 256 -P /tmp/memcached.pid【中間的ip地址是ifconfig查詢與添加上的】
7、查看是否安裝成功
netstat -tunlp
出現錯誤:
configure: error: cannot run /bin/sh ./config.sub
解決方案:http://blog.csdn.net/hero06206/article/details/7294499
linux上啟動Memcache報錯:error while loading shared libraries: libevent-1.4.so.2
解決方案:
ln -s /usr/lib/libevent-1.4.so.2 /usr/lib64/libevent-1.4.so.2
參考文章:http://chenzhou123520.iteye.com/blog/1925196
參考文章:
http://blog.csdn.net/zenwong/article/details/6708715
http://zhaochen.blog.51cto.com/2029597/390037
http://www.itokit.com/2011/0527/66305.html
linux上安裝memcached