RedHat Linux AS3.0 配置 Resin3.0.14

由于TOMCAT的性能实在是太差,没办法,只能尝试使用RESIN。今天终于有时间配置下了,顺便记录下配置的过程。
 
下载 resin-pro-3.0.14.tar.gz
上传到服务器
 
$tar zxvf resin-pro-3.0.14.tar.gz
$./configure
$gmake
$gmake install
$ln -s resin-pro-3.0.14 resin
 
这样安装就完成了。可以通过 bin/httpd.sh 启动。
 
$bin/httpd.sh (start|stop|restart)
 
我稍微修改了 httpd.sh 这个文件
 JAVA_HOME=/usr/local/java
 export JAVA_HOME

RESIN_HOME=/usr/local/resin
export RESIN_HOME
 
#这个数值一般是你物理内存的80%
args="-Xms512M -Xmx512M"
 
我还修改了resin.conf,加入虚拟主机设定
<!--此处的class-update-interval是Resin检查类是否更新的时间,一般在生产机上,最好设长一些,比如24h(24小时)-->
<host id='www.aaa.com' app-dir='/home/aaa' character-encoding='UTF8' class-update-interval='2'>
<!--是否允许管理,即在线查看Resin的状态(Resin-status)-->
<allow-admin>true</allow-admin>
<!--错误页面设置-->
<error-page>
<error-code>404</error-code>
<location>/error/404.html</location>
</error-page>
<error-log id='log/bbs-error.log'/>
<!--默认首页-->
<welcome-file-list>index.jsp</welcome-file-list>
<!--以下配置是防止目录浏览,也可以用于该hosts下的新应用程序配置-->
<web-app id='/'>
<directory-servlet id='false'/>
</web-app>
<!--比如在该站点下新增scottit应用程序(这是一个可以监控j2ee的应用程序)-->
<web-app id='/scottit' app-dir='/data/web_root/scottit'/>
</host>

查看Resin运行状态的Servlet配置方法:
在web.xml中加入Servlet映射:

<servlet-mapping url-pattern='/resin-status'
servlet-name='com.caucho.http.servlet.ResinStatusServlet'>
<init-param enable='read'/>
</servlet-mapping>

同时在resin.conf的设定中,在host部分确认加入
<allow-admin>true</allow-admin>

 

另外:

Resin官方推荐的j2EE性能监测工具Scottit最新版3.0
请在附件下载,以下是配置说明:

1.请下载完后,把scottit.war放到Resin的webapps目录下(启动resin时,会自动发布该应用程序)
2.在你的j2ee应用程序的WEB-INF/web.xml中加入:

<filter>
<filter-name>Scottit</filter-name>
<filter-class>com.ustobe.scottit.ApplicationFilter</filter-class>
<init-param>
<param-name>html-debugger</param-name>
<param-value>enable</param-value>
</init-param>
</filter>
<filter-mapping>
<url-pattern>*.jsp</url-pattern>
<filter-name>Scottit</filter-name>
</filter-mapping>
</filter>

3.启动resin
3.1 按正常方式查看你的j2ee
可以看到jsp页面最下方有该页面的执行时间等信息
3.2 浏览你的scottit程序,可以看到你的j2ee程序的性能和Resin Server的性能,及JVM相关信息。这样可以找出你的j2ee中哪些页面效率低。。。 
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值