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?

More than 5 years have passed since last update.

brewでredisをインストールしてみよう

Last updated at Posted at 2015-12-05

前提

・homebrewがインストールされている

redisインストール

$ brew install redis
==> Downloading https://homebrew.bintray.com/bottles/redis-3.0.5.el_capitan.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/redis-3.0.5.el_capitan.bottle.tar.gz
==> Pouring redis-3.0.5.el_capitan.bottle.tar.gz
==> Caveats
To have launchd start redis at login:
  ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
Then to load redis now:
  launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Or, if you don't want/need launchctl, you can just run:
  redis-server /usr/local/etc/redis.conf
==> Summary
🍺  /usr/local/Cellar/redis/3.0.5: 9 files, 892K
$

ログイン時、自動起動するように登録

$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

今すぐサーバー起動する。

$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

redis設定ファイルの場所

/usr/local/etc/redis.conf
# Redis configuration file example.
#
# Note that in order to read the configuration file, Redis must be
# started with the file path as first argument:
#
# ./redis-server /path/to/redis.conf
...

起動して確認

$ redis-cli
127.0.0.1:6379> set 'a' 111
OK
127.0.0.1:6379> get 'a'
"111"
127.0.0.1:6379> exit
$ 
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?