下載
redis-3.0.7.tar.gzredis
官網地址:http://redis.io/downloadxcode
解壓ide
tar -zvxf redis-3.0.7.tar.gz測試
將解壓後的文件夾放到 /usr/local目錄下idea
編譯測試
接下來在終端中切換到/usr/local/redis目錄下,輸入:code
sudo make testserver
備註:若是mac上沒有xcode,會下載編譯包,點擊下載便可get
顯示結果:it
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!
編譯安裝:在終端中輸入命令:io
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 `-._ `-._`-.__.-'_.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | `-._ `-._`-.__.-'_.-' _.-' `-._ `-.__.-' _.-' `-._ _.-' `-.__.-'