memcached在windows安裝

來源:互聯網
上載者:User

標籤:

:

http://s3.amazonaws.com/downloads.northscale.com/memcached-win64-1.4.4-14.zip
http://s3.amazonaws.com/downloads.northscale.com/memcached-win32-1.4.4-14.zip

 

1. 在終端(也即cmd命令介面)下輸入 ‘c:\memcached\memcached.exe -d install’ 安裝
2. 再輸入: ‘c:\memcached\memcached.exe -d start’ 啟動。

NOTE: 以後memcached將作為windows的一個服務每次開機時自動啟動。這樣伺服器端已經安裝完畢了。

 

That is it, now your memcached server is installed and is listening to port 11211.

There is one more thing left to do. By default, server is set to 64Mb memory limit, which is too small. To correct, go to Registry Editor and find key

HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/memcached  Server .

Change the ImagePath entry to:

“C:/memcached/memcached.exe” -d runservice -m 512

This way you will use 512 Mb memory limit for your server.

 

 

停止memcached:

D:\wamp_win7\bin\memcached-win32-1.4.4-14> memcached.exe -d stop


卸載memcached:

D:\wamp_win7\bin\memcached-win32-1.4.4-14> memcached.exe -d uninstall

 

 

相關問題:
1、設定最大佔用記憶體後好像沒起作用。
-m tells memcached how much RAM to use for item storage (in megabytes). Note carefully that this isn‘t a global memory limit, so memcached will use a few % more memory than you tell it to. Set this to safe values. Setting it to less than 48 megabytes does not work properly in 1.4.x and earlier. It will still use the memory.

 

2、在同一個程式集裡將一個值放入到memcache裡,馬上去時可以取到,但是在另一個程式集裡取的時候取不到,或者telnet也拿不到值。
可能問題及解決辦法:
a. 儲存的值序列化後不同類型,則需要將其更新為同一類型,建議使用同一的常見類型,如string,int等,放入string可以拼成一個xml字串,然後到使用的時候在做解析
b. 很有可能是memcache池已經滿了,可以設定<socketPool minPoolSize="100" maxPoolSize="1000" connectionTimeout="00:10:00" deadTimeout="00:02:00"/>

 

memcached基本參數設定:
-p 監聽的連接埠
-l 串連的IP地址, 預設是本機
-d start 啟動memcached服務
-d restart 重起memcached服務
-d stop|shutdown 關閉正在啟動並執行memcached服務
-d install 安裝memcached服務
-d uninstall 卸載memcached服務
-u 以的身份運行 (僅在以root啟動並執行時候有效)
-m 最大記憶體使用量,單位MB。預設64MB
-M 記憶體耗盡時返回錯誤,而不是刪除項
-c 最大同時串連數,預設是1024
-f 塊大小增長因子,預設是1.25
-n 最小分配空間,key+value+flags預設是48
-h 顯示協助

memcached在windows安裝

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.