zip -r -q -o pack.zip apache-tomcat-9.0.80
[root@VM-0-16-centos tomcat]# ls
apache-tomcat-9.0.80 apache-tomcat-9.0.80.tar.gz pack.zip
xftp传到新服务器上
[root@ls tomcat]# pwd
/usr/tomcat
[root@ls tomcat]# ls
apache-tomcat-9.0.80 pack.zip
[root@ls bin]# ./startup.sh
Using CATALINA_BASE: /usr/tomcat/apache-tomcat-9.0.80
Using CATALINA_HOME: /usr/tomcat/apache-tomcat-9.0.80
Using CATALINA_TMPDIR: /usr/tomcat/apache-tomcat-9.0.80/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/tomcat/apache-tomcat-9.0.80/bin/bootstrap.jar:/usr/tomcat/apache-tomcat-9.0.80/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Tomcat started.
这咋就成功了
哦这边的java home一致的
所以没问题了
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environ
搜嘎 java_home 那就 配一下白
在tomcat的bin目录下,编辑catalina.sh文件,加入
export JAVA_HOME=/usr/local/java/jdk1.8.0_151
export JRE_HOME=/usr/local/java/jdk1.8.0_151/jre
这两行,重新启动就正常!
openjdk version “1.8.0_382”
echo $JAVA_HOME
结果:/opt/tlk/java
echo $PATH
结果:
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/opt/tlk/java/bin:
/opt/CollabNet_Subversion/bin:/home/lukang.tlk/bin
tomcat 打包移植到其他服务器_复制tomcat到另一个服务器-CSDN博客