Install SSL Certificate Tomcat bash script

6 Mar 2010

by hemanth

  1. :
  2.  
  3. SECURITY_FOLDER="${JAVA_HOME}/jre/lib/security"
  4. if [ ! -d "${SECURITY_FOLDER}" ] ; then
  5. SECURITY_FOLDER="${JAVA_HOME}/lib/security"
  6. if [ ! -d "${SECURITY_FOLDER}" ] ; then
  7. echo "Your {JAVA_HOME} does not contain the expected security folder. ${JAVA_HOME}/jre/lib/security"
  8. exit 1
  9. fi
  10. fi
  11.  
  12.  
  13. $JAVA_HOME/bin/keytool -keystore keystore -alias acegisecurity -genkey -keyalg RSA -validity 710 -storepass changeit -keypass changeit
  14.  
  15. $JAVA_HOME/bin/keytool -export -v -rfc -alias acegisecurity -file security.txt -keystore keystore -storepass changeit
  16.  
  17. sudo cp security.txt ${SECURITY_FOLDER}
  18.  
  19. cp -r keystore ${CXPS_RUNTIME}/tomcat/
  20.  
  21. cd ${SECURITY_FOLDER}
  22.  
  23. sudo $JAVA_HOME/bin/keytool -import -v -file security.txt -keypass changeit -keystore cacerts -storepass changeit -alias acegisecurity
Share this