brew install memcached
app
<?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 memcached
xml
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