1 、 80% 的物理內存
/home/tomcat/bin/catalina.sh 中添加
Java_OPTS='-Xms256m -Xmx512m'
管理機:
Java_OPTS='-Xms256m -Xmx1024m'
支撐機:
Java_OPTS='-Xms256m -Xmx768m'
測試機:
export LD_ASSUME_KERNEL = 2.4.1
2 、 Tomcat 自啟動設置:
/etc/rc.local 文件
sshd
touch /var/lock/subsys/local
/etc/init.d/MySQL start
export Java_HOME=/home/j2sdk
cd /home/tomcat/bin
。/startup.sh
3 、 MySQL 自啟動設置:
/etc/rc.local 文件
/etc/init.d/MySQL start
3 、設置虛擬路徑:
/home/tomcat/conf/server.XML 文件:
4 、連接數配置:
/home/tomcat/conf/server.XML 文件:
port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="100" debug="0" connectionTimeout="20000"
useURIValidationHack="false" disableUploadTimeout="true" URIEncoding="UTF-8"/>
<!—— Note : To disable connection timeouts, set connectionTimeout value
to 0 ——>
<!—— Define a SSL Coyote HTTP/1.1 Connector on port 8443 ——>
<!——
port="8443" minProcessors="5" maxProcessors="75"
enableLookups="true"
acceptCount="100" debug="0" scheme="https" secure="true"
useURIValidationHack="false" disableUploadTimeout="true">
clIEntAuth="false" protocol="TLS" />
5 、管理機 root.XML 配置
/home/tomcat/bin/root.XML
<?XML version="1.0" encoding="UTF-8"?>