centos7部署tomcat

centos7部署tomcat
强烈推介IDEA2021.1.3破解激活,IntelliJ IDEA 注册码,2021.1.3IDEA 激活码 

大家好,我是架构君,一个会写代码吟诗的架构师。今天说一说centos7部署tomcat,希望能够帮助大家进步!!!

centos7部署tomcat:

参考网址:https://www.cnblogs.com/joe2047/p/9588847.html

tomcat上部署Jenkins:

参考网址:https://blog.csdn.net/q13554515812/article/details/83211508

 

写启动jenkins服务脚本,命令如下

vim /etc/init.d/jenkins 

脚本内容如下:

#!/bin/sh
#
# Startup script for the Jenkins Continuous Integration server
# (via Jakarta Tomcat Java Servlets and JSP server)
#
# chkconfig: - 85 15
# description: Jakarta Tomcat Java Servlets and JSP server
# processname: tomcat
# pidfile: /var/run/tomcat.pid
# Set Tomcat environment.
JENKINS_USER=root
LOCKFILE=/var/lock/jenkins
export PATH=/usr/local/bin:$PATH
export HOME=/jenkins
export JAVA_HOME=/usr/lib/jvm/java-1.8.0export JENKINS_BASEDIR=/jenkins
export TOMCAT_HOME=/usr/local/tomcat
export CATALINA_PID=$JENKINS_BASEDIR/jenkins-tomcat.pid
export CATALINA_OPTS="-DJENKINS_HOME=$JENKINS_BASEDIR/jenkins-home -Xmx512m -Djava.awt.headless=true"
[ -f $TOMCAT_HOME/bin/catalina.sh ] || exit 0
export PATH=$PATH:/usr/bin:/usr/local/bin
# See how we were called. case "$1" in start) # Start daemon. echo -n "Starting Tomcat: " su -p -s /bin/sh $JENKINS_USER -c "$TOMCAT_HOME/bin/catalina.sh start" RETVAL=$? echo [ $RETVAL = 0 ] && touch $LOCKFILE ;; stop) # Stop daemons. echo -n "Shutting down Tomcat: " su -p -s /bin/sh $JENKINS_USER -c "$TOMCAT_HOME/bin/catalina.sh stop" RETVAL=$? echo [ $RETVAL = 0 ] && rm -f $LOCKFILE ;; restart) $0 stop $0 start ;; condrestart) [ -e $LOCKFILE ] && $0 restart ;; status) status tomcat ;; *) echo "Usage: $0 {start|stop|restart|status}" exit 1
esac
exit 0

 

转载于:https://www.cnblogs.com/jingzaixin/p/11561507.html

本文来源weixin_30595035,由架构君转载发布,观点不代表Java架构师必看的立场,转载请标明来源出处:https://javajgs.com/archives/29255

发表评论