Mac 10.14.3 Memcached

安裝

brew install memcachedapp

修改參數

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>homebrew.mxcl.memcached</string>
  <key>KeepAlive</key>
  <true/>
  <key>ProgramArguments</key>
  <array>
    <string>/usr/local/opt/memcached/bin/memcached</string>
    <string>-l</string>
    <string>0.0.0.0</string>
    <string>-p</string>
    <string>12306</string>
    <string>-m</string>
    <string>2048</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
  <key>WorkingDirectory</key>
  <string>/usr/local</string>
</dict>
</plist>

主要看配置中的memcached

<string>/usr/local/opt/memcached/bin/memcached</string>
    <string>-l</string>
    <string>0.0.0.0</string>
    <string>-p</string>
    <string>12306</string>
    <string>-m</string>
    <string>2048</string>

-p : 指定端口號
-m : 限制內存code

啓動服務

brew services start memcachedxml

查看進程

ps aux|grep memcached進程

--- 進程結果 -----
silver 84530 0.0 0.0 4285688 1904 ?? S 4:24下午 0:00.03 /usr/local/opt/memcached/bin/memcached -l 0.0.0.0 -p 12306 -m 2048homebrew

相關文章
相關標籤/搜索