部署resin3的一些注意事项
一直使用resin2.x版本,不过一直没有太多深入研究,最近在升级resin3版本时遇到很多问题,无意中发现一些大的网站后台也在使用resin,具体是谁我这里就不详细说明了,不过看到的都是比较老的版本,2.1.3甚至更老的2.0.4,配置了负载,并且与apache结合使用。
下面是从resin3文档在linux下使用时总结的一些东西:
Deployment Directories When deploying, it’s a good idea to create a bit of structure to make Resin and website upgrades easier and more maintainable.
1、Create a user to run Resin (e.g. resin or another non-root user)
2、Link /usr/local/share/resin to the current Resin version. This is $RESIN_HOME.
3、Create a deployment root, e.g. /var/www, owned by the resin user. This is $RESIN_ROOT.
4、Put the modified resin.conf in /etc/resin/resin.conf
5、Put the site documents in /var/www/webapps/ROOT.
6、Put any .war files in /var/www/webapps.
7、Put any virtual hosts in /var/www/hosts/www.foo.com.
8、Output logs will appear in /var/www/log.
9、Create a startup script and configure the server to start it when the machine reboots.
10、start/stop and the watchdog process
unix> java -jar /usr/local/share/resin/lib/resin.jar \
-conf /etc/resin/resin.conf \
start
Configure the location of Java in JAVA_HOME
Configure the location of Resin in RESIN_HOME
Configure your web site directory in RESIN_ROOT
Select a server and pid file if you have multiple Resin servers. Start and stop the Resin daemon.
当然你可以自己写启动resin的脚本,也可以让resin跟随系统启动而一起启动。
本文固定链接: https://www.2hei.net/2007/11/18/resin_tart_in_linux/ | 2hei.net
最活跃的读者