redis

brew install 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

可以編輯 /usr/local/etc/redis.conf, 設置 redis 密碼 requirepass

啟動:

# redis-server
redis-server /usr/local/etc/redis.conf
127.0.0.1:6379> pfadd mykey a b c
(integer) 1
127.0.0.1:6379> pfcount mykey
(integer) 3
127.0.0.1:6379> pfadd mykey2 a b c c d
(integer) 1
127.0.0.1:6379> pfcount mykey2
(integer) 4
127.0.0.1:6379> 

批量刪除某一類 key

redis-cli -h 10.0.0.200 -a 'verycomplexpassword' -n 3 KEYS 'ST_*Qr*' | xargs redis-cli -h 10.0.0.200 -a 'verycomplexpassword' -n 3  DEL

或者

redis-cli -h [127.0.0.1](127.0.0.1) -p 8177

進入后輸入 auth 進行驗證。

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容