安装tomcat:
yum install tomcat (默认为tomcat 7)
配置tomcat证书(有公司https key、crt文件情况):
openssl pkcs12 -export -in ming.crt -inkey ming.key -out ming.p12 -certfile gd_bundle-g2-g1.crt
设置密码
keytool -importkeystore -alias 1 -destkeystore tomcat.keystore -srckeystore ming.p12 -srcstoretype pkcs12
设置同上密码
cp -rv tomcat.keystore /etc/tomcat/
修改端口为443
vi /etc/tomcat/server.xml (需改2处)
connectionTimeout="20000"
redirectPort="443" />
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" keystoreFile="/etc/tomcat/tomcat.keystore" keystorePass="xxxxx" />
:wq
安装authbind
touch /etc/authbind/byport/443
chown tomcat:tomcat /