Last active
July 19, 2022 15:05
-
-
Save developer-sdk/a9912421377c34fa41b7029ce0bbeb12 to your computer and use it in GitHub Desktop.
redis SSL 적용
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################### | |
# 빌드 | |
# redis download | |
$ wget https://download.redis.io/releases/redis-6.2.7.tar.gz | |
# 압축 해제 | |
tar zxf redis-6.2.7.tar.gz | |
# 이동 | |
cd redis-6.2.7 | |
# 빌드 | |
make BUILD_TLS=yes | |
########################################### | |
# 실행 | |
# 서버 | |
redis-server redis.conf \ | |
--tls-port 6379 --port 0 \ | |
--tls-cert-file ca.crt \ | |
--tls-key-file ca.key \ | |
--tls-ca-cert-file ca.crt | |
# 클라이언트 | |
redis-cli -h $(hostname -i) \ | |
--tls \ | |
--cert ca.crt \ | |
--key ca.key \ | |
--cacert ca.crt PING | |
########################################### | |
# 서버 실행 주의 사항 | |
- 인증서 설정에 따라 ca-cert-file 은 CA 용 인증서를 이용해야 할 수 있음 | |
- CA 인증서를 따로 설정하는 경우 클라이언트의 cacert 설정은 제거 해야 함 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment