Mac安裝Redis服務器
安裝
1.到官網下載 選擇穩定版本
打開官網:https://redis.io/
![](http://static.javashuo.com/static/loading.gif)
2.下載完成後,打開命令行工具,執行解壓命令
tar zxvf redis-5.0.3.tar.gz
3.將解壓後文件夾放到 /usr/local
sudo mv redis-5.0.3 /usr/local/
這裏輸入的是你本機的密碼
4.切換目錄進行操做
cd /usr/local/redis-5.0.3/
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
5.編譯測試
sudo make test
![](http://static.javashuo.com/static/loading.gif)
6.編譯安裝
sudo make install
![](http://static.javashuo.com/static/loading.gif)
7.啓動 redis-server
出現一個圖標就表示能夠了
8.配置 在redis目錄下創建bin,etc,db三個目錄
sudo mkdir /usr/local/redis-5.0.3/bin
sudo mkdir /usr/local/redis-5.0.3/etc
sudo mkdir /usr/local/redis-5.0.3/db
![](http://static.javashuo.com/static/loading.gif)
9.把/usr/local/redis/src目錄下的mkreleasehdr.sh,redis-benchmark, redis-check-rdb, redis-cli, redis-server拷貝到bin目錄
cp /usr/local/redis-5.0.3/src/mkreleasehdr.sh .
cp /usr/local/redis-5.0.3/src/redis-benchmark .
cp /usr/local/redis-5.0.3/src/redis-check-rdb .
cp /usr/local/redis-5.0.3/src/redis-cli .
cp /usr/local/redis-5.0.3/src/redis-server .
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
10. 拷貝 redis.conf 到 /usr/local/redis/etc下
cp /usr/local/redis-5.0.3/redis.conf /usr/local/redis-5.0.3/etc
11.進程查看
ps aux | grep redis
使用
添加/查找 鍵
![](http://static.javashuo.com/static/loading.gif)
查看全部的 鍵
![](http://static.javashuo.com/static/loading.gif)
rdm下載
https://redisdesktop.com/ 要註冊才能下載
http://www.pc6.com/mac/486661.html 直接下載
rdm客戶端的操做
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)