Mac Redis 使用

Mac Redis 使用

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
$ brew install redis #安装
==> Downloading https://homebrew.bintray.com/bottles/redis-3.2.0.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring redis-3.2.0.el_capitan.bottle.tar.gz
==> Caveats
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
==> Summary
🍺 /usr/local/Cellar/redis/3.2.0: 10 files, 1.7M
$ brew services start redis #To have launchd start redis now and restart at login
==> Tapping homebrew/services
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-services'...
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 7 (delta 0), reused 3 (delta 0), pack-reused 0
Unpacking objects: 100% (7/7), done.
Checking connectivity... done.
Tapped 0 formulae (32 files, 46.1K)
==> Successfully started `redis` (label: homebrew.mxcl.redis)
$ redis-server #Starting Redis,查看当前redis运行情况
$ redis-cli ping #检查是否启动
PONG
$ redis-cli # 进入redis 命令
127.0.0.1:6379> ping
PONG
127.0.0.1:6379> set mykey hello
OK
127.0.0.1:6379> get mykey
"hello"
127.0.0.1:6379>
$ redis-cli shutdown #控制台输入 关闭命令
命令路径:
~ /usr/local/bin/redis-server /usr/local/etc/redis.conf

Mac redis 客户端的安装

1
2
3
4
5
# Install Homebrew cask
$ brew install caskroom/cask/brew-cask
# Install Redis Desktop Manager aka RDM
$ brew cask install rdm

http://www.tuicool.com/articles/nM73Enr

http://my.oschina.net/jackieyeah/blog/524583

http://docs.redisdesktop.com/en/latest/install/#mac-os-x