mac下redis的基本使用

1周前 22次点击 来自 其他

通过homeBrew安装redis:

brew search redis 
 //出现如下
 ==> Searching local taps...
hiredis         redis           redis-leveldb   redis@2.8       redis@3.2
==> Searching taps on GitHub...
homebrew/cask/redis-app
==> Searching blacklisted, migrated and deleted formulae...

启动Redis:

# To have launchd start redis now and restart at login:
  brew services start redis
  
# Or, if you don't want/need a background service you can just run:
  redis-server /usr/local/etc/redis.conf

查看进程:

ps axu | grep redis

连接客户端:

redis-cli -h 127.0.0.1 -p 6379

查询数据:

127.0.0.1:6379> get("123")

关闭:

redis-cli shutdown

杀死:

sudo pkill redis-server
Card image cap
开发者雷

尘世间一个小小的开发者,每天增加一些无聊的知识

技术文档 >> 系列应用 >>
热推应用

Let'sLearnSwift

学习Swift的入门教程
标签