新工程部署到/app/resin-www/<project_dir>下
修改/app/resin/conf/resin.xml ,在最后面追加(或修改,参考test那段)<cluster id="test">... </cluster>,注意id和端口不要重复,允许两个cluster指向同一个${project_dir}
启动单一服务: ./resin.sh start -server <cluster_id>
关闭单一服务: ./resin.sh stop -server <cluster_id>
单一服务启动后,将会生成独log文件: ${resin_home}/log/jvm-<cluster_id>.log
访问,
例cluster_id: test:http://10.100.138.69:8091/
例cluster_id: test1:http://10.100.138.69:8092/
resin.xml(只贴自定义cluster部分,这两段贴到xml最后 ,</resin>之前既可 ):
<!--add by shanl -->
<cluster id="test">
<root-directory>.</root-directory>
<server-default>
<!-- The http port -->
<http address="*" port="8091"/>
</server-default>
<!-- define the servers in the cluster -->
<server id="test" address="127.0.0.1" port="6901">
</server>
<!-- the default host, matching any host name -->
<host id="" root-directory=".">
<web-app id="/" root-directory="/app/resin-www/test"/>
</host>
</cluster>
<cluster id="test1">
<root-directory>.</root-directory>
<server-default>
<!-- The http port -->
<http address="*" port="8092"/>
</server-default>
<!-- define the servers in the cluster -->
<server id="test1" address="127.0.0.1" port="6902">
</server>
<!-- the default host, matching any host name -->
<host id="" root-directory=".">
<web-app id="/" root-directory="/app/resin-www/test"/>
</host>
</cluster>
resin-www目录结构
[root@localhost resin-www]# pwd
/app/resin-www
[root@localhost resin-www]# tree
.
└── test
├── index.jsp
├── index.jsp.old
└── WEB-INF
├── classes