tomcat+nginx部署站点
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tomcat+nginx部署站点相关的知识,希望对你有一定的参考价值。
tomcat
tomcat启动脚本
#!/bin/bash # chkconfig: 2345 74 44 # description: Tomcat is a Java Servlet Container . /etc/profile TOMCAT_HOME=/application/tomcat/ start () { TOMCAT_PID=`ps -ef |grep "$TOMCAT_HOME" |grep -v "grep" |awk ‘{print $2}‘` if [ -z $TOMCAT_PID ];then /bin/bash $TOMCAT_HOME/bin/startup.sh else echo "$0 is running" fi } stop () { TOMCAT_PID=`ps -ef |grep "$TOMCAT_HOME" |grep -v "grep" |awk ‘{print $2}‘` if [ -z $TOMCAT_PID ];then echo "$0 is not running" else echo "shutting down $0" kill -9 "$TOMCAT_PID" && echo "PID $TOMCAT_PID killed." fi } status () { TOMCAT_PID=`ps -ef |grep "$TOMCAT_HOME" |grep -v "grep" |awk ‘{print $2}‘` if [ -z $TOMCAT_PID ];then echo "$0 is not running" else echo "$0 is running PID is $TOMCAT_PID" fi } case $1 in start) start #tail -f $TOMCAT_HOME/logs/catalina.out ;; stop) stop ;; status) status ;; restart) stop start #tail -f $TOMCAT_HOME/logs/catalina.out ;; *) echo "Usage:$0 {start|stop|status|restart}." ;; esac
本文出自 “逗哥笔记” 博客,请务必保留此出处http://qiuyt.blog.51cto.com/1229789/1972095
以上是关于tomcat+nginx部署站点的主要内容,如果未能解决你的问题,请参考以下文章
Nginx + Tomcat 反向代理 如何在高效的在一台服务器部署多个站点
详解Nginx + Tomcat 反向代理 如何在高效的在一台服务器部署多个站点
详解Nginx + Tomcat 反向代理 如何在高效的在一台服务器部署多个站点