1. JVM 配置
- 添加 tomcat 管理员
[root@server ~]# vim /tomcat/conf/tomcat-users.xml
- 修改 JVM 虚拟内存
JAVA_OPTS="-server -Xms1024m -Xmx1024m -Xmn256m -XX:PermSize=512m -XX:MaxPermSize=1024m -Djava.awt.headless=true -Dfile.encoding=utf-8"
2. apr 安装
- 安装依赖
[root@server ~]# yum -y install gcc expat-devel
- 安装
[root@server ~]# mkdir /usr/local/apr[root@server apr-1.6.3]# ./configure --prefix=/usr/local/apr[root@server apr-1.6.3]# make && make install
- 安装
[root@server apr-util-1.6.1]# ./configure --prefix=/usr/local/apr --with-apr=/usr/local/apr[root@server apr-util-1.6.1]# make && make install
- 安装
[root@server ~]# cd tomcat-native-1.2.17-src/native/[root@server native]# ./configure --prefix=/usr/local/apr --with-apr=/usr/local/apr --with-java-home=/usr/java/jdk1.7.0_80/[root@server native]# make && make install
- 修改 tomcat 配置
[root@server ~]# vim /tomcat/bin/catalina.sh
# 添加 CATALINA_OPTSCATALINA_OPTS="-Djava.library.path=/usr/local/apr/lib"
[root@server ~]# vim /tomcat/conf/server.xml
3. SSLEngine Error
-
查看 tomcat 日志,出现 SSLEngine Error org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Failed to initialize the SSLEngine. {:.error}
-
解决办法
[root@server ~]# vim /tomcat/conf/server.xml