Cloud & NoSQL & Middleware/Redis

MacOS에서 Redis 설치 및 실행

swifty 2018. 7. 1. 16:36

MacOS에서 Redis 설치


mac에서는 설치유틸리티인 brew를 통해 손쉽게 redis를 설치할 수 있다.




Redis 설치


$brew install redis





Redis 서비스 실행, 중지, 재시작


$brew services start redis

$brew services stop redis

$brew services restart redis



Redis 설정


# Accept connections on the specified port, default is 6379.

# If port 0 is specified Redis will not listen on a TCP socket.
port  6379   [포트번호 변경]

# Warning: since Redis is pretty fast an outside user can try up to
# 150k passwords per second against a good box. This means that you should
# use a very strong password otherwise it will be very easy to break.
#
requirepass password  [주석제거하고 패스워드 입력]

# By default Redis listens for connections from all the network interfaces
# available on the server. It is possible to listen to just one or multiple
# interfaces using the "bind" configuration directive, followed by one or
# more IP addresses.
#
# Examples:
#

# bind 192.168.1.100 10.0.0.1  
bind 127.0.0.1 192.168.0.101   [외부에서 접근 가능하도록 IP 추가 가능]





Redis 실행


$redis-server







Redis 클라이언트


https://redisdesktop.com 에서 클라이언트를 다운받고 쉽게 redis를 사용할 수 있다.




설치


ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null



brew cask install rdm