0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ローカルのmacにRedisをインストール

Last updated at Posted at 2024-11-21

Homebrewにてインストール

brew install redis

サーバ起動

macにログインした場合や再起動した場合に、バックグラウンドで自動的に起動させる

brew services start redis

ログで 「==> Successfully started redis (label: homebrew.mxcl.redis)」と出たら成功

使い方

クライアント起動

redis-cli

キー値をセット

127.0.0.1:6379> set MyKey MyValue
OK

値を取得

127.0.0.1:6379> get MyKey
"MyValue"

キーと値を削除

127.0.0.1:6379> del MyKey
(integer) 1

127.0.0.1:6379> get MyKey
(nil)

終了

127.0.0.1:6379> quit
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?