# EC2 OpenSSL 적용
기본Path : /usr/local/ssl/key_store
1. 설치
yum install openssl -y
2.설치 확인
openssl version
3.개인키생성 (pwd : 1234)
*** openssl genrsa -des3 -out keyName.key 2048
ex) openssl genrsa -des3 -out xxxxx.key 2048
4.인증 요청서(CSR) 생성
*** openssl req -new -key keyName.key -out csrName.csr
ex) openssl req -new -key xxxxx.key -out xxxxx.csr // 위에서 생성한 비번 입력
5.인증서(CRT) 생성
*** openssl x509 -req -days 365 -in csrName.csr -signkey keyName.key -out crtName.crt
ex) openssl x509 -req -days 365 -in xxxxx.csr -signkey xxxxx.key -out xxxxx.crt
6.톰캣에서 사용할 수 있는 키스토어 파일 생성
*** openssl pkcs12 -export -in crtName.crt -inkey keyName.key -out keyName.p12 -name tomcat
ex) openssl pkcs12 -export -in xxxxx.crt -inkey xxxxx.key -out xxxxx.p12 -name tomcat
TOMCAT server.xml 수정 ( p12 파일 사용 )
<
Connector protocol="org.apache.coyote.http11.Http11NioProtocol"
port="8443" SSLEnabled="true" maxThreads="200"
scheme="https" secure="true"
keystoreFile="/usr/local/tomcat/ssl_keystore/xxxxx.p12"
keystorePass="1234"
keystoreType="pkcs12"
clientAuth="false"
sslProtocol="TLS"
/>
'개발 > 리눅스' 카테고리의 다른 글
AWS에 Jupyter Notebook 기본서비스로 설정 (0) | 2022.07.02 |
---|---|
공짜 SSL Certbot 적용 (0) | 2022.04.14 |
Linux 현재 날짜/시간 확인 및 변경 (0) | 2021.01.26 |
Linux locale ( 한글 언어 설정 ) (0) | 2021.01.26 |
Linux 파일 압축 해제 (0) | 2020.10.29 |