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
[size=medium]Unix (including Linux and MacOS-X)[/size]
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

[size=medium]Windows[/size]
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
發佈了41 篇原創文章 · 獲贊 0 · 訪問量 2694
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章