1. serverKeys keystore 생성


  1. serverKeys 경로 생성
# 전 서버에 적용
[root@host] mkdir -p /etc/security/serverKeys
  1. keystore 파일 생성
$ cd /etc/security/serverKeys
[root@host1] keytool -genkey -alias node1 -keyalg RSA -keysize 1024 -dname CN=$hostname,OU=hw,O=hw,L=paloalto,ST=ca,C=us -keystore node1_keystore.jks -storepass jinwon15
[root@host2] keytool -genkey -alias node2 -keyalg RSA -keysize 1024 -dname CN=$hostname,OU=hw,O=hw,L=paloalto,ST=ca,C=us -keystore node2_keystore.jks -storepass jinwon15
[root@host3] keytool -genkey -alias node3 -keyalg RSA -keysize 1024 -dname CN=$hostname,OU=hw,O=hw,L=paloalto,ST=ca,C=us -keystore node3_keystore.jks -storepass jinwon15
  1. certificate 파일 생성
$ cd /etc/security/serverKeys
[root@host1] keytool -export -alias node1 -keystore node1_keystore.jks -rfc -file node1_certificate.jks
[root@host2] keytool -export -alias node2 -keystore node2_keystore.jks -rfc -file node2_certificate.jks
[root@host3] keytool -export -alias node3 -keystore node3_keystore.jks -rfc -file node3_certificate.jks
  1. truststore 파일 생성
$ cd /etc/security/serverKeys
[root@host1] keytool -import -noprompt -alias node1 -file node1_certificate.jks -keystore node1_trust.jks
[root@host2] keytool -import -noprompt -alias node2 -file node2_certificate.jks -keystore node2_trust.jks
[root@host3] keytool -import -noprompt -alias node3 -file node3_certificate.jks -keystore node3_trust.jks