快速业务通道

LINUX下用脚本实现JDK TOMCAT

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-05-04
dk>/opt/tomcat/conf/server.xml

rm -rf /opt/tomcat/conf/djdk /opt/tomcat/conf/aaa

mv /opt/tomcat/bin/startup.sh /opt/tomcat/bin/aaa
touch /opt/tomcat/bin/startup.sh

Empire CMS,phome.net

chmod a x /opt/tomcat/bin/startup.sh
aa="/opt/tomcat/bin/startup.sh"
echo "export JAVA_HOME=/usr/jdk
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:.
export PATH=$PATH:$JAVA_HOME/bin
export CATALINA_HOME=/opt/tomcat
/opt/tomcat/bin/catalina.sh start
" >$aa
echo "/opt/tomcat/bin/startup.sh" >> /etc/rc.d/rc.local

chkconfig --level 3 httpd off

source /etc/profile

/opt/tomcat/bin/startup.sh

touch /hello.java

echo "public class HelloWorld{
public static void main(String args[]){
System.out.println("nihao");

}
}

" > /hello.java

sed ''s/nihao/"Hello, World"/g'' /hello.java >/HelloWorld.java

rm -rf hello.java

touch /mmm.sh

echo "#!/bin/bash
#This is the script testing JAVA
javac /HelloWorld.java
java HelloWorld

if
HelloWorld="Haha"

then

echo "Successful"

else

echo "Fail"

fi

" > /mmm.sh


sed ''s/Haha/"Hello, Wrold"/g'' /mmm.sh>/kkk.sh
sed ''s/Successful/"Successful"/g'' /kkk.sh>/nnn.sh
sed ''s/Fail/"Fail"/g'' /mmm.sh>/hello.sh

rm -rf /mmm.sh /kkk.sh /nnn.sh
chmod a x /hello.sh


fi


echo "Jdk tomcat installation and allocation have been completed.

You can work also no to come to test an once IP being able to import a server on IE.

Hanging coming to test once JAVA your hello.sh

under being able to run root builds"


再次希望朋友们提出宝贵的意见.为了你我的提高.一直努力着.

Empire CMS,phome.net

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号