Resin4安装配置
#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 #访问,创建用户admin@admin 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
本文来自博客园,作者:blog-elvin-vip,转载请注明原文链接:https://www.cnblogs.com/elvi/p/7718051.html