개발자의 노트
Published 2012. 10. 22. 06:46
redis 설치 소프트웨어개발/Redis
반응형

설치라고 할 것도 없음

http://redis.io/download 에서 설명하는대로 하면 됨.. 위치만 좀 달리..

의존성 패키지 설치

# yum install gcc

redis 설치

# cd /usr/local/src
# wget http://redis.googlecode.com/files/redis-2.4.14.tar.gz
# tar zxvf redis-2.4.14.tar.gz
# cp -Rf redis-2.4.14 /usr/local/redis
# cd /usr/local/redis
# make

설치 끝..

포트 변경 및 접속 비밀번호 설정은 redis.conf 파일을 열어서 수정한다.

# 포트 번호 변경하고 주석 제거
# 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 foobared

위 설정파일대로 서버 구동을 하기 위해 설정파일을 지정해서 실행..

# nohup ./src/redis-server /usr/local/redis/redis.conf &

명령행 클라이언트를 실행하려면

# ./src/redis-cli
redis 127.0.0.1:6379>

포트를 변경했다면

# ./src/redis-cli -p 포트번호
redis 127.0.0.1:6379>

비밀번호를 설정했다면, 접속 후

redis 127.0.0.1:6379>AUTH 비밀번호

redis 명령어는 아래에 자세히 나온다.

http://redis.io/commands

profile

개발자의 노트

@곽코딩

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!