Comments (1)
应该是jdk环境变量没配置吧,JAVA_HOME写死到启动脚本里当然也是可以的
[root@localhost init.d]# cat tomcat
#!/bin/bash
#chkconfig:- 20 90
#description:tomcat
#processname:tomcat
TOMCAT_HOME=/usr/local/tomcat/apache-tomcat-8.5.55
case $1 in
start) su root $TOMCAT_HOME/bin/startup.sh;;
stop) su root $TOMCAT_HOME/bin/shutdown.sh;;
*) echo "require start|stop" ;;
esac
[root@localhost init.d]#
[root@localhost init.d]# java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
[root@localhost init.d]#
[root@localhost init.d]# service tomcat shutdown
require start|stop
[root@localhost init.d]# service tomcat start
Using CATALINA_BASE: /usr/local/tomcat/apache-tomcat-8.5.55
Using CATALINA_HOME: /usr/local/tomcat/apache-tomcat-8.5.55
Using CATALINA_TMPDIR: /usr/local/tomcat/apache-tomcat-8.5.55/temp
Using JRE_HOME: /usr/local/java/jdk1.8.0_161
Using CLASSPATH: /usr/local/tomcat/apache-tomcat-8.5.55/bin/bootstrap.jar:/usr/local/tomcat/apache-tomcat-8.5.55/bin/tomcat-juli.jar
Tomcat started.
[root@localhost init.d]#
from javacollection.
Related Issues (4)
- 好家伙 HOT 1
- nginx配置问题 HOT 1
- 请问嵌入式方向的图哪去了 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javacollection.