1》
libevent安裝
官網down:
我的網盤down
:[root@luozhonghuamemcachedsource]#tar-zxvflibevent-1.4.13-stable.tar.gz
[root@luozhonghuamemcachedsource]#cdlibevent-1.4.13-stable
[root@luozhonghuamemcachedsource]#./configure--prefix=/usr
[root@luozhonghuamemcachedsource]#make&&makeinstall
#./configure--prefix=/usr&&make&&makeinstall
這裡一定要注意指定--prefix
,後面配置
memcached
的時候就有必要用到。 2》
memcached安裝
官網down:
我的網盤down
:[root@luozhonghuamemcachedsource]#tar-zxvfmemcached-1.4.5.tar.gz
[root@luozhonghuamemcachedsource]#cdmemcached-1.4.5
[root@luozhonghuamemcached-1.4.5]#./configure--with-libevent=/usr/lib
[root@luozhonghuamemcached-1.4.5]#make&&makeinstall
#./configure--with-libevent=/usr/lib&&make&&makeinstall
這裡一定要指定libevent
的路徑,否則啟動的時候就有找不到
libevent的so
檔案的錯誤!
3>memcached啟動
#/usr/local/bin/memcached-m32m-p11211-d-uroot-p/var/run/memcached.pid-c256-vv
/usr/local/bin/memcached-d-m512-p11211-uroot-c256-p/var/run/memcached.pid
4>memcached關閉
kill-9`cat/var/run/memcached.pid`
注意,如果`cat/var/run/memcached.pid`值是快取上一次的就無效,可直接查到pid值
=7787
5>測試
5.1>telnet127.0.0.111211
5.2>stats
stats
statpid7787
statuptime470
stattime1405273052
statversion1.4.5
statpointer_size32
statrusage_user0.002999
statrusage_system0.101984
statcurr_connections10
stattotal_connections12
statconnection_structures11
statcmd_get0
statcmd_set0
statcmd_flush0
statget_hits0
statget_misses0
statdelete_misses0
statdelete_hits0
statincr_misses0
statincr_hits0
statdecr_misses0
statdecr_hits0
statcas_misses0
statcas_hits0
statcas_badval0
statauth_cmds0
statauth_errors0
statbytes_read27
statbytes_written49
statlimit_maxbytes536870912
stataccepting_conns1
statlisten_disabled_num0
statthreads4
statconn_yields0
statbytes0
statcurr_items0
stattotal_items0
statevictions0
statreclaimed0
end6》退出
quit
Memcached安裝和基本使用
2.解壓之後放在硬碟的目錄下,如 d memcached.然後在執行中輸入cmd進入命令列,進入到memcached.exe 所在的目錄,例如 d memcached,然後輸入 memcached d install,即可完成安裝。memcached還有其他的一些常用的命令如下 p 監聽的埠 l 連...
Linux 安裝和使用memcached
在開始安裝和使用 using memcached 之前,我們需要了解如何將 memcached 融入到您的環境中。雖然在任何地方都可以使用 memcached,但我發現需要在資料庫層中執行幾個經常性查詢時,memcached 往往能發揮最大的效用。我經常會在資料庫和應用伺服器之間設定一系列 memc...
memcached編譯安裝
tar xvf memcached 1.4.15.tar.gz cd memcached 1.4.15 configure prefix usr local memcache 出現了 configure error libevent is required.you can get it from t...