Centos 7 기준 redis 5.0.3 tar server 실행
Redis 5.0.3 tar를 다운받아 centos 7 기준으로 실행하는 방법.
Root 계정 기준 명령어
1. 필요 패키지 설치
~]# yum install -y make wget gcc
2. Redis 설치
wget http://download.redis.io/releases/redis-5.0.3.tar.gz
tar xzf redis-5.0.3.tar.gz
cd redis-5.0.3
make
참고로 gcc가 제대로 설치가 된 상태에서 make를 해야 한다. 먼저 make 실행 후 실패하고 나서 gcc 설치 후 다시 make하면 xxx.h 파일을 못 찾는다고 에러가 난다. 그럴 경우 redis 폴더를 지우고 다시 압축해제해서 make 하면 된다.
make가 완료된 결과(1분 정도 걸림)
3. Redis server 실행
src/redis-server
4. Redis server 종료
ctrl + c
이상으로 Redis server를 tar로 실행하는 방법을 알아봤다.
그 외 redis.conf 설정파일 기반으로 실행하는 방법이나 옵션은
src/redis-server --help 명령어나 아래 사이트 문서를 참고하기 바란다.
Redis doc: https://redis.io/documentation
기타1. Help 명령어
[root@localhost redis-5.0.3]# src/redis-server --help
기타2. 백그라운드 실행 방법
redis.conf 수정
[root@localhost redis-5.0.3]# vi redis.conf
Line 136: daemonize no -> yes
[root@localhost redis-5.0.3]# src/redis-server redis.conf # 실행
[root@localhost redis-5.0.3]# src/redis-cli shutdown # 종료
끝.