下載
redis-3.0.7.tar.gz
解壓
tar -zvxf redis-3.0.7.tar.gz
將解壓後的資料夾放到 /usr/local目錄下
編譯測試
接下來在終端中切換到/usr/local/redis目錄下,輸入:
sudo make test
備註:如果mac上沒有xcode,會下載編譯包,點選下載即可
顯示結果:
43 seconds - integration/replication-4
28 seconds - unit/obuf-limits
48 seconds - integration/replication
111 seconds - integration/replication-psync
o/ All tests passed without errors!
Cleanup: may take some time... OK
o/ All tests passed without errors!
編譯安裝:在終端中輸入命令:
sudo make install
顯示結果:
cd src && /Library/Developer/CommandLineTools/usr/bin/make install
INSTALL redis-sentinel
CC redis-cli.o
LINK redis-cli
CC redis-benchmark.o
LINK redis-benchmark
CC redis-check-dump.o
LINK redis-check-dump
Hint: It`s a good idea to run `make test` ;)
INSTALL install
INSTALL install
INSTALL install
INSTALL install
INSTALL install
啟動Redis,輸入命令
redis-server
顯示結果:
_.-``__ ``-._
_.-`` `. `_. ``-._ Redis 3.0.7 (00000000/0) 64 bit
.-`` .-```. ```/ _.,_ ``-._
( ` , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|`` _.-`| Port: 6379
| `-._ `._ / _.-` | PID: 11715
`-._ `-._ `-./ _.-` _.-`
|`-._`-._ `-.__.-` _.-`_.-`|
| `-._`-._ _.-`_.-` | http://redis.io
`-._ `-._`-.__.-`_.-` _.-`
|`-._`-._ `-.__.-` _.-`_.-`|
| `-._`-._ _.-`_.-` |
`-._ `-._`-.__.-`_.-` _.-`
`-._ `-.__.-` _.-`
`-._ _.-`
`-.__.-`