`
sillycat
  • 浏览: 2550910 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Server Deployment - Resin

阅读更多
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




分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics