resin4.0.53安装部署文档
2017-08-26 03:18
155 查看
resin4.0.53安装部署文档
1.下载安装包
wget http://caucho.com/download/resin-4.0.53.tar.gz
2.解压安装
tar xzvf resin-4.0.53.tar.gz cd resin-4.0.53 ./configure --prefix=/data/resin-4.0.53 make && make install
3.配置resin.properties
cd /data/resin-4.0.53/conf vim resin.properties
将app_servers参数改为
127.0.0.1:6852
注释app.http和web.http
一定要注释app.http,app_servers参数改不改也可以,因为我们会在resin.xml中不使用它,不改的话,会有歧义
4.配置resin.xml,修改端口与部署war包
vim resin.xml
删除id不是app的cluster,只保留app cluster,其余不需要,此cluster的示例配置如下:
<cluster id="app"> <!-- <server-multi id-prefix="app-" address-list="${app_servers}" port="6800"/> --> <server id="app" address="127.0.0.1" port="6852" > <watchdog-port>4852</watchdog-port> <http address="*" port="8852"/> </server> <host-default> <!-- creates the webapps directory for .war expansion --> <web-app-deploy path="webapps" expand-preserve-fileset="WEB-INF/work/**" multiversion-routing="${webapp_multiversion_routing}" path-suffix="${elastic_webapp?resin.id:''}"/> </host-default> <!-- the default host, matching any host name --> <host id="" root-directory="."> <web-app id="/" root-directory="/path/to/appdir"/> </host> <resin:if test="${resin_doc}"> <host id="${resin_doc_host}" root-directory="${resin_doc_host}"> <web-app id="/resin-doc" root-directory="${resin.root}/doc/resin-doc"/> </host> </resin:if> </cluster>
重点关注server与host标签
server配置了管理端口:6852,监控端口:4852,http端口:8852
管理端口:resin内部管理使用
监控端口:类似守护进度,时刻关注resin是否挂了,若挂了则重启
http端口:对外开放使用的http端口
host配置了app路径,如果是部署war包,使用以下配置
<host id="" root-directory="."> <web-app id="/" root-directory="webapps/app" archive-path="/path/to/app.war"/> </host>
web-app标签解释
archive-path:war包路径
root-directory:war包解压之后的文件存放路径
5.启动/停止/重启 resin
cd resin-4.0.53/bin ./resinctl start ./resinctl stop ./resinctl restart ./resinctl status ./resinctl console
附加说明
在resin中使用spring框架注入properties文件时,若properties文件未找到,则需要修改配置<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations" value="classpath:*.properties" /> <property name="ignoreUnresolvablePlaceholders" value="true" /> </bean>
将
classpath:*.properties改为
classpath*:*.properties即可
相关文章推荐
- FastDHT安装部署文档
- 延云YDB&&YA100安装部署文档
- CDH4.1(hadoop-2.0.0-cdh4.1.2)安装部署文档
- Nginx部署文档(二进制包安装)
- zabbix3.0安装部署文档
- zabbix3.0.4安装部署文档(三)----添加监控主机
- Nagios安装部署与 Cacti整合文档
- MetaQ调研及安装部署文档
- Apache安装及jboss部署说明文档
- zabbix监控安装部署文档
- Apache安装及jboss部署说明文档1
- 延云YDB&&YA100安装部署文档
- MetaQ调研及安装部署文档
- zabbix3.0.4安装部署文档(一)
- Oracle11gR2 Aactive DataGuard(手动)安装部署及维护文档(二)之快照及管理
- ELK 安装部署文档-实战
- Oracle 10g R2 RAC 安装部署文档
- Lustre2.4安装部署文档