Server Deployment - Resin

本文介绍如何在本地Ubuntu服务器上安装并配置Resin应用服务器,实现类似Tomcat/Jetty的应用部署。通过三个实例演示如何使用不同的端口运行同一应用,并提供启动脚本及配置文件示例。
Server Deployment - Resin

Try to install resin on my local server. Deploy my instances on ubuntu as the same as tomcat/jetty.
1. Install resin
>tar zxvf resin-4.0.18.tar.gz
>cd resin-4.0.18
>./configure --prefix=/home/luohua/tools/resin
>sudo make
>sudo make install

2. My shell scripts
start-resin1.sh
#!/bin/sh

RESIN_HOME="/home/luohua/tools/resin"
RESIN_BASE="/home/luohua/tools/shellscript/resin1"
export RESIN_HOME RESIN_BASE

cd ${RESIN_HOME}
java -jar lib/resin.jar -conf "${RESIN_BASE}/resin.xml" -server resin1 start

start-resin2.sh is almost the same as start-resin1.sh, so was start-resin3.sh
#!/bin/sh

RESIN_HOME="/home/luohua/tools/resin"
RESIN_BASE="/home/luohua/tools/shellscript/resin2"
export RESIN_HOME RESIN_BASE

cd ${RESIN_HOME}
java -jar lib/resin.jar -conf "${RESIN_BASE}/resin.xml" -server resin2 start

3. Configuration files
resin1/resin.xml
<cluster id="resin1">
<server id="resin1" address="127.0.0.1" port="6801">
<http id="" port="8083"/>
</server>

<host id="" root-directory=".">
<web-app id="/easymarket" root-directory="/home/luohua/tools/shellscript/apps/easymarket"/>
</host>
</cluster>
resin1/app-default.xml is copied from the resin installed directory.

resin2/resin.xml:
<cluster id="resin2">
<server id="resin2" address="127.0.0.1" port="6802">
<http id="" port="8084"/>
</server>

<host id="" root-directory=".">
<web-app id="/easymarket" root-directory="/home/luohua/tools/shellscript/apps/easymarket"/>
</host>
</cluster>
resin3/resin.xml:
<cluster id="resin3">
<server id="resin3" address="127.0.0.1" port="6803">
<http id="" port="8085"/>
</server>

<host id="" root-directory=".">
<web-app id="/easymarket" root-directory="/home/luohua/tools/shellscript/apps/easymarket"/>
</host>
</cluster>

4. Test these URLs
http://localhost:8083/easymarket
http://localhost:8084/easymarket
http://localhost:8085/easymarket

references:
http://www.caucho.com/
http://caucho.com/resin-4.0/admin/starting-resin.xtp
http://www.vinceruan.info/java/deploy_muti_resin_4_one_server/
http://rqyyy.iteye.com/blog/314928
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值