Tomcat:部署JFinal应用
使用Tomcat部署JFinal应用,首先修改server.xml,在Host节点下增加路径:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context path="" reloadable="false" docBase="/var/riguz/WebRoot"/>
...
修改端口、URI编码等:
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="8443" />
然后将WebRoot文件夹放上去启动就成了。附一个超简单的备份脚本:
timestamp=WebRoot-$(date +%Y%m%d-%H%M%S).zip
./stop.sh
echo "backing up to $timestamp ..."
mv WebRoot ${timestamp} && echo 'Success!'