Javier's Blog

Mostly computers and other tech stuff,...

Friday, June 13, 2008

Tomcat

Create a serlf signed SSL certificate for Tomcat.
mkdir ssl
cd ssl
openssl req -new -out REQ.pem -keyout KEY.pem
openssl req -x509 -in REQ.pem -key KEY.pem -out CERT.pem
openssl req -verify -in REQ.pem
openssl req -verify -in REQ.pem -key KEY.pem
openssl req -text -in REQ.pem


Backup old SSL key just in case something goes wrong
mkdir old_ssl
cp /usr/local/tomcat/.keystore old_ssl/keystore


Stop Tomcat
/etc/init.d/tomcat stop


Delete the Tomcat certificate from the keystore and install new one
sudo ln /usr/local/tomcat/.keystore /root/.keystore
sudo /usr/java/jdk1.6.0/bin/keytool -delete -alias tomcat
sudo /usr/java/jdk1.6.0/bin/keytool -import -v -trustcacerts -alias tomcat -file CERT.pem


Start Tomcat
sudo /etc/init.d/tomcat start

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home