1、下载并安装tomcat:
二进制版本直接解压到/usr/local/tomcat
2、下载并安装apr:
#./configure --prefix=/usr/local/apr
#make & make install
3、设置apr库文件路径
#cat /etc/ld.so.conf.d/apr.conf
/usr/local/apr/lib
#ldconfig -v
4、安装tomcat的native库
#cd /usr/local/tomcat/bin
#tar zxf tomcat-native.tar.gz
#cd tomcat-native-1.1.16-src/jni/native/
#./configure --with-apr=/usr/local/apr
#make & make install
5、使用openvpn自带的easy-rsa生成证书,将证书文件拷贝到/usr/local/tomcat/ssl(略)
6、编辑tomcat配置文件,在Service容器中增加下面的
#vi /usr/local/tomcat/conf/server.xml
port="8443"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
SSLCertificateFile="/usr/local/tomcat/conf/server.crt"
SSLCertificateKeyFile="/usr/local/tomcat/conf/server.key"
sslProtocol="TLS"/>
7、在tomcat的/usr/local/tomcat/startup.sh脚本的start之前加入apr的库路径,如果第四步的设置无效。
export LD_LIBRARY_PATH=/usr/local/apr/lib
8、重启tomcat
参考:
阅读(797) | 评论(0) | 转发(0) |