Resin4安装配置

Posted Elvin笔记分享

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Resin4安装配置相关的知识,希望对你有一定的参考价值。

 

# Resin4安装配置
#centos6
#参考http://467754239.blog.51cto.com/4878013/1558435

#yum -y install gcc gcc-c++ make
#安装jdk ……
#安装resin
wget http://caucho.com/download/resin-4.0.51.zip
unzip resin-4.0.51.zip
cd resin-4.0.51
 ./configure --prefix=/usr/local/resin #--with-java-home=/usr/local/jdk1.8.0_45/
make && make install

#启动、重启
#/usr/local/resion/bin/resin.sh start
#service resin start
/etc/init.d/resin restart
tail -f t/usr/local/resin/log/access.log #查看日志

##配置
#---------------------------------
#配置/resin-admin
cd cd /usr/local/resion/conf/
vim resin.properties
    web_admin_external : true #开启远程访问
/etc/init.d/resin restart
http://172.16.11.25:8080/resin-admin #访问,创建用户[email protected]
cp admin-users.xml.generated admin-users.xml
#---------------------------------
#部署web测试
mkdir /usr/local/resin/webapps/api
vim /usr/local/resin/webapps/api/index.jsp 
<%@ page language="java" %>
<html>
  <head><title>ResinA</title></head>
  <body>
    <h1><font color="red">ResinA </font></h1>
    <table align="centre" border="1">
      <tr>
        <td>Session ID</td>
    <% session.setAttribute("abc","abc"); %>
        <td><%= session.getId() %></td>
      </tr>
      <tr>
        <td>Created on</td>
        <td><%= session.getCreationTime() %></td>
     </tr>
    </table>
  </body>
</html>
# 修改配置
vim /usr/local/resin/conf/resin.xml
    <web-app id="/" root-directory="webapps/ROOT"/>
    <web-app id="/api" root-directory="webapps/api"/> #增加行
        #地址绝对路径/usr/local/resin/webapps/api
http://172.16.11.25:8080/api/ #访问web
#基于端口、目录、域名的部署
vim /usr/local/resin/conf/resin.xml
#倒数第二行添加如下
<!-- 测试 -->
<cluster id="app2">
    <server-multi id-prefix="app2" address-list="${app2_servers}" port="6802"/>
        <host id="a.com" root-directory=".">
        <host-alias>www.a.com</host-alias>
      <web-app id="/" root-directory="/it/web/a.com"/>
    </host>
</cluster>
vim  /usr/local/resin/conf/resin.properties
app2_servers      : 127.0.0.1:6802
app2.http         : 8082
service resin restart
netstat -atnlp |grep java
http://a.com:8082 #访问web
#---------------------------------

netstat -antp|grep 8080


tail -f t/usr/local/resin/log/access.log

 

以上是关于Resin4安装配置的主要内容,如果未能解决你的问题,请参考以下文章

Resin4 自定义端口

配置resin4多实例

如何配置resin4将session保存到redis

eclipse3.7+resin4.0集成配置小结

resin4.0服务器远程调试说明

Resin4下JSP文件导出问题的解决