linux jdk|tomcat脚本

阅读更多

1.用户信息

/etc/passwd
lishoubin:x:11994:100::/home/lishoubinTest:/bin/csh

2. .tcshrc 文件


if ( ! $?LD_LIBRARY_PATH ) then
    setenv  LD_LIBRARY_PATH         /lib:/usr/lib:/usr/local/lib
endif
if ( ! $?LIBPATH ) then
    setenv  LIBPATH         /lib:/usr/lib:/usr/local/lib
endif
setenv WEB_HOME  ${HOME}/hwcsp6
setenv JAVA_HOME  ${WEB_HOME}/jdk1.5.0_16
setenv LANG zh_CN
if ( -`uname -s` == '-HP-UX' ) then
    setenv JAVA_HOME  /opt/java1.5
    setenv LANG zh_CN.hp15CN
endif
if ( -`uname -s` == '-AIX' ) then
    setenv JAVA_HOME  /usr/java5_64
    setenv LANG zh_CN.GB18030
    setenv   AIXTHREAD_SCOPE        S
    setenv   AIXTHREAD_MUTEX_DEBUG  OFF
    setenv   AIXTHREAD_COND_DEBUG   OFF
    setenv   AIXTHREAD_RWLOCK_DEBUG OFF
endif
setenv JAVA_BINDIR  ${JAVA_HOME}/jre/bin
setenv JAVA_ROOT  ${JAVA_HOME}
setenv JRE_HOME  ${JAVA_HOME}/jre
setenv PATH  ${JAVA_HOME}/bin:${WEB_HOME}/bin:${WEB_HOME}/icdcomm/bin:${PATH}
setenv ICDCOMMDIR ${WEB_HOME}/icdcomm
setenv ICDCOMMCFG ${WEB_HOME}/icdcomm/config/icdcomm.cfg
setenv LD_LIBRARY_PATH  ${WEB_HOME}/icdcomm/lib:${LD_LIBRARY_PATH}
setenv LIBPATH ${WEB_HOME}/icdcomm/lib:${LIBPATH}
setenv IDEPLOYSCRIPT /home/WEB/breeze/ideploy/20110822205849.11/script
setenv CLASSPATH ./:${IDEPLOYSCRIPT}:${IDEPLOYSCRIPT}/jdom.jar:${IDEPLOYSCRIPT}/lib:${IDEPLOYSCRIPT}/ideploy:${WEB_HOME}/bin:${JAVA_HOME}/jre/lib:${JAVA_HOME}/lib
alias  all         "stopWEB;startWEB;showlog "
alias  jsp         "cd ${WEB_HOME}/webapps/WEB/WEB-INF/jsp "
alias  js          "cd ${WEB_HOME}/webapps/WEB/WEB-INF/jsp/js "
alias  startWEB    "cd ${WEB_HOME}/bin; ./startup.sh ; rm -rf ${WEB_HOME}/work/* "
alias  qstartWEB   "cd ${WEB_HOME}/bin; ./startup.sh quick; rm -rf ${WEB_HOME}/work/* "
alias  stopWEB     "cd ${WEB_HOME}/bin; ./clearall.sh  "
alias  dstopWEB    "cd ${WEB_HOME}/bin; ./clearall.sh dump "
alias  jdbc        "cd ${WEB_HOME}/webapps/WEB/WEB-INF/classes "
alias  showWEB     "ps -ef| grep ${LOGNAME}| grep '/java '| grep -v grep "
alias  WEB         "cd ${WEB_HOME}/webapps/WEB"
alias  lib         "cd ${WEB_HOME}/webapps/WEB/WEB-INF/lib "
alias  bin         "cd ${WEB_HOME}/bin "
alias  conf        "cd ${WEB_HOME}/webapps/WEB/WEB-INF/conf "
alias  search      "cd ${WEB_HOME}/webapps/WEB/WEB-INF/classes/search "
alias  tomconf     "cd ${WEB_HOME}/conf "
alias  log         "cd ${WEB_HOME}/bin/local "
alias  tomlog      "cd ${WEB_HOME}/logs "
alias  showlog     "tail -f  ${WEB_HOME}/logs/tomcatconsole.log "
alias  startw      "cd ${WEB_HOME}/bin; sh startwtomcat.sh "
alias  stopw       "cd ${WEB_HOME}/bin; ./wtomcat.csh stop & "
alias  showw       "cd ${WEB_HOME}/bin; ps -ef| grep WEB| grep wtomcat.csh| grep -v grep  "
alias  rlog        "rm -f ${WEB_HOME}/bin/local/* ; rm -rf ${WEB_HOME}/work/* "
alias  mlog        "rm -rf ${WEB_HOME}/bin/local/* ; rm -rf ${WEB_HOME}/work/* ; rm -rf ${WEB_HOME}/bin/logs/* ; rm -f ${WEB_HOME}/logs/*.log "
alias  showtype    "cat ${WEB_HOME}/webapps/WEB/WEB-INF/classes/serverInfo.properties | grep -i 'servertype=' "
alias  crp         "cd ${WEB_HOME}/bin; sh crp.sh  "
alias  ll          "ls -l  "
alias  bakWEB      "cd ${WEB_HOME}/webapps; tar -zcvpf WEB_back_`date +%F`_bak.tgz WEB; cd -"
if ( -`uname -r| grep '2.6.5'|wc -l ` == '-1' ) then
   setenv LIBPATH   ${WEB_HOME}/WEBlib/suse/suse9:${LIBPATH}  
   setenv LD_LIBRARY_PATH  ${WEB_HOME}/WEBlib/suse/suse9/jdk32bit:${WEB_HOME}/WEBlib/suse:${LD_LIBRARY_PATH}
endif
if ( -`uname -r| grep '2.6.16'|wc -l ` == '-1' ) then
   setenv LIBPATH   ${WEB_HOME}/WEBlib/suse/suse10:${LIBPATH}  
   setenv LD_LIBRARY_PATH  ${WEB_HOME}/WEBlib/suse/suse10:${WEB_HOME}/WEBlib/suse:${LD_LIBRARY_PATH}
endif
if ( -`uname -a| awk '{print $3}'` == '-11.11' ) then
   setenv LIBPATH   ${WEB_HOME}/WEBlib/hp/hp11.11:${LIBPATH}  
   setenv LD_LIBRARY_PATH  ${WEB_HOME}/WEBlib/hp/hp11.11:${WEB_HOME}/WEBlib/hp:${LD_LIBRARY_PATH}
endif
 if ( -`uname -a| awk '{print $3}'` == '-11.23' ) then
   setenv LIBPATH   ${WEB_HOME}/WEBlib/hp/hp11.23:${LIBPATH}  
   setenv LD_LIBRARY_PATH  ${WEB_HOME}/WEBlib/hp/hp11.23:${LD_LIBRARY_PATH}
endif
if ( -`uname -s` == '-AIX' ) then
   setenv LIBPATH   ${WEB_HOME}/WEBlib/aix/aix5.3/jdk64bit:${LIBPATH}  
   setenv LD_LIBRARY_PATH  ${WEB_HOME}/WEBlib/aix/aix5.3/jdk64bit:${WEB_HOME}/WEBlib/aix/aix5.3:${LD_LIBRARY_PATH}
endif

 

你可能感兴趣的:(SuSE)