linux上安裝memcached

來源:互聯網
上載者:User

標籤: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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.