[MAC] redis 설치하기
homebrew로 간단히 redis를 설치하고 사용하는 방법을 알아 봅니다.
설치하기
$ brew install redis
==> Downloading https://homebrew.bintray.com/bottles/redis-4.0.6.high_sierra.bottle.ta
######################################################################## 100.0%
==> Pouring redis-4.0.6.high_sierra.bottle.tar.gz
==> Caveats
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
==> Summary
🍺 /usr/local/Cellar/redis/4.0.6: 13 files, 2.8MB
설치되 redis 정보 확인
$ brew info redis
redis: stable 4.0.6 (bottled), HEAD
Persistent key-value database, with built-in net interface
https://redis.io/
/usr/local/Cellar/redis/4.0.6 (13 files, 2.8MB) *
Poured from bottle on 2017-12-16 at 12:00:58
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/redis.rb
==> Options
--with-jemalloc
Select jemalloc as memory allocator when building Redis
--HEAD
Install HEAD version
==> Caveats
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
실행하기
$ redis-server
redis cli
$ redis-cli ping
PONG
삭제하기
$ brew uninstall redis
$ rm ~/Library/LaunchAgents/homebrew.mxcl.redis.plist