数据下载工作笔记四:用web管理xml

回想上次做web项目还是一年前在渣打,做了个烂得都不好意思多看一眼的网站,演示的时候还崩了...

数据下载任务,嗯,长期而艰巨,工欲善其事,必先利其器,花了四天时间把脚本一的内容重写了一遍。现在可以在浏览器中直接管理下载地址/查看正在进行的下载任务。

tomcat开机自动启动:

看网上很多解决方式都是在rc.local中添加一句${tomcat_dir}/bin/startip.sh。但是实际操作中发现没有启动成功。

解决方法:自己先创建了一个auto.sh,内容为:

/home/xinwang/tomcat7/apache-tomcat-7.0.42/bin/catalina.sh start
cd /home/xinwang/tomcat7/apache-tomcat-7.0.42/webapps/ddm/download/
nohup ./checkmodifiedLinkFile.sh>>/dev/null &

此脚本让tomcat和checkmodifiedlinkfile同时启动。然后在rc.local中添加执行auto.sh的命令,结果发现还是不能执行。将错误输出到/tmp/rc.log,出现了"Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program"的错误。于是在auto.sh中又添加一句命令,手动设置JAVA_HOME:

export JAVA_HOME=/home/xinwang/jdk_1.7/jdk1.7.0_25
export JRE_HOME=${JAVA_HOME}/jre

成功。

posted on 2013-09-11 11:21  甲马  阅读(232)  评论(0编辑  收藏  举报

导航