john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

Tomcat6 ssl generate openssl cert

-Add Canonical partners repository to apt sources (uncomment the lines)

vi /etc/apt/sources.list

deb http://archive.canonical.com/ubuntu lucid partner deb-src http://archive.canonical.com/ubuntu lucid partner

/etc/apt/sources.list.d/canonical.com.list ?

apt-get install sun-java6-jre

OPTIONAL IF YOU'VE ALREADY INSTALLED OPENJDK update-java-alternatives --jre-headless -s java-6-sun

-Install libtcnative-1 and tomcat6 apt-get install libtcnative-1 tomcat6

-Add logrotate configuration /etc/logrotate.d/tomcat6

DISABLE IPV6

sudo nano /etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6=1

Modify the Config files (uncomment and/or add) /etc/tomcat6/server.xml

maxThreads="250" scheme="https" secure="true" (up it to 2500?)

YOU MIGHT NEED AN INTERMEDIATE CERTIFICATE /var/lib/ssl/intermediate.crt (e.g. .pem must be downloaded from your CA SSL provider)

/var/lib/ssl

cert.crt cert.key

chown tomcat6:root /var/lib/ssl -R
chmod 400 /var/lib/ssl -R

(If getting error that cannot check up the chain / contact vendor )

OPTIMIZATIONS (i.e. prevent JVM heap exhaustion)

sudo rm /etc/localtime sudo ln -sf /usr/share/zoneinfo/UTC /etc/localtime sudo ntpdate pool.ntp.org sudo /sbin/hwclock --systohc

* means all users, root means only root, and user means users...
sudo nano /etc/security/limits.conf (modify ulimit up from 1024 to something better)
    * soft nofile 65000
    * hard nofile 65000
    root soft nofile 65000
    root hard nofile 65000 
sudo nano /etc/pam.d/common-session
    session required pam_limits.so 
sudo reboot
ulimit -a = kernel params

Modify the Tomcat defaults file sudo nano /etc/default/tomcat6

JAVA_OPTS="-Djava.awt.headless=true -Xms256m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m"


IF MODIFIED APPS OR JSP'S THEN ENSURE YOU CLEAR THE CACHE

/etc/init.d/tomcat6 stop rm -rf /var/cache/tomcat6/Catalina/localhost rm /var/log/tomcat6/catalina rm /var/log/tomcat6/localhost /etc/init.d/tomcat6 start


  • « PropertiesDuplicateChecker
  • drupal 11 display feeds aggregator module »

Published

Jul 6, 2012

Category

linux

~209 words

Tags

  • cert 2
  • generate 2
  • linux 249
  • openssl 4
  • ssl 8
  • tomcat6 7