resin 4多实例部署及启停


新工程部署到/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


转载于:https://my.oschina.net/tangcoffee/blog/526508

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值