resin的配置优化

下载resin源码包 : resin-3.0.18.tar.gz
  [path]#cp resin-3.0.18.tar.gz /usr/local/
  [path]#cd /usr/local/
  [path]#tar -zxvf resin-3.0.18.tar.gz
  [path]#cd resin-3.0.18
  [path]#./configure –prefix=/usr/local/resin  --with-apxs=/usr/local/apache2/bin/apxs <如果需要与Apache整合必须有此选项>
  [path]#make && make install
   安装完成后, 修改resin.conf对应参数进行优化配置 .
     Resin优化选项 :
<!-- JVM参数设置 -->   
<jvm-arg>-Xmx2048m</jvm-arg>   
<jvm-arg>-Xss1024m</jvm-arg>   
<jvm-arg>-Xdebug</jvm-arg>   
<jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg>   
<!-- Uncomment to enable admin heap dumps 去掉下面行以管理内存堆的倾倒 -->  
<!-- <jvm-arg>-agentlib:resin</jvm-arg>    -->   
<watchdog-arg>-Dcom.sun.management.jmxremote</watchdog-arg>  
<!-- 强制resin强制重起时的最小空闲内存 -->   
<memory-free-min>1M</memory-free-min>   
<!-- 最大线程数量. -->   
<thread-max>4000</thread-max>   
<!--  套接字等待时间 -->   
<socket-timeout>65s</socket-timeout>   
<!-- 配置 keepalive -->   
<keepalive-max>2500</keepalive-max>   
<keepalive-timeout>15s</keepalive-timeout>   
<!--  设置缓存页、静态也的延时值  -->   
<cache-mapping url-pattern="/" expires="5s"/>   
<cache-mapping url-pattern="*.gif" expires="60s"/>   
<cache-mapping url-pattern="*.jpg" expires="60s"/>   
<cache-mapping url-pattern="*.png" expires="60s"/>

参考官方的安装如下:
http://caucho.com/resin-3.1/doc/resin-web-server.xtp
Unix (including Linux and MacOS-X)
Getting Started
The following steps will start Resin for development:

Install JDK 1.5 or later and link /usr/java to your Java home or set environment variable JAVA_HOME.
tar -vzxf resin-3.1.0.tar.gz in /usr/local/share
(Optional) Link /usr/local/share/resin to the resin-3.1.0 directory.
./configure; make; make install
some ./configure options are available
Run java -jar resin/lib/resin.jar
Or run resin/bin/httpd.sh
Browse http://localhost:8080

Windows
Getting Started
Install JDK 1.5 or later.
Make sure the JDK installation set the environment variable JAVA_HOME correctly
Unzip resin-3.1.0.zip
Run java -jar resin-3.1.0/lib/resin.jar
Or execute resin-3.1.0/httpd.exe
Browse http://localhost:8080

猜你喜欢

转载自flyer2010.iteye.com/blog/726719
今日推荐