Mac memcached

  • MacBooK Pro,M1安装memcach
  • Memcached 的启动和停止

安装memcached

使用homebrew安装memcached:

~ arch -arm64 brew install memcached
==> Downloading https://xxx.ustc.edu.cn/homebrew-bottles/bottles/memcached-1.6.9.arm64_big_sur.bottle.tar.gz
#=#=-#  #                                                                     
curl: (22) The requested URL returned error: 404 
Warning: Bottle missing, falling back to the default domain...
==> Downloading https://ghcr.io/v2/homebrew/core/memcached/manifests/1.6.9
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/memcached/blobs/sha256:c18d3d914a52d960a1ad33be43e2ebc35faaf3aca9b2db0fb6829
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c18d3d914a52d960a1ad33be43e2ebc35faaf3ac
######################################################################## 100.0%
==> Pouring memcached--1.6.9.arm64_big_sur.bottle.tar.gz
==> Caveats
To have launchd start memcached now and restart at login:
  brew services start memcached
Or, if you don't want/need a background service you can just run:
  /opt/homebrew/opt/memcached/bin/memcached
==> Summary
🍺  /opt/homebrew/Cellar/memcached/1.6.9: 12 files, 311.5KB

安装路径:/opt/homebrew/Cellar/memcached/
在这里插入图片描述
在这里插入图片描述

启动 memcached

启动memcached

brew services start memcached
~ brew services start memcached                                                             
Service `memcached` already started, use `brew services restart memcached` to restart.~ brew services restart memcached
Stopping `memcached`... (might take a while)
==> Successfully stopped `memcached` (label: homebrew.mxcl.memcached)
==> Successfully started `memcached` (label: homebrew.mxcl.memcached)

启动之后,查看活动监视器

请添加图片描述

停止 memcached

查看 memcached 所在的进程 id

ps -ef|grep memcached

kill 进程id

kill xxx
~ ps -ef|grep memcached
  501  2823     1   0  1:42下午 ??         0:05.60 /opt/homebrew/opt/memcached/bin/memcached -l localhost
  501 11224 11002   0 10:42上午 ttys000    0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox memcached
➜  ~ kill 2823~ ps -ef|grep memcached
  501 11270     1   0 10:49上午 ??         0:00.02 /opt/homebrew/opt/memcached/bin/memcached -l localhost
  501 11273 11002   0 10:49上午 ttys000    0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox memcached

kill 之后进程自动又起了,可能是我开了 VSCode ? 关了vscode之后在 kill 发现还是不行,但是活动监视器里内存的占用明显低了。

何解?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Morris_

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值