经过上次的折腾,这次一遍过了,呜呜呜
重置服务器N+1次
先理一下版本
本机环境:
macOS 10.14.5 (18F132)
Eclipse IDE for Enterprise Java Developers Version: 2019-06 (4.12.0)
apache-tomcat-9.0.21
java version “12” 2019-03-19
Java™ SE Runtime Environment (build 12+33)
Java HotSpot™ 64-Bit Server VM (build 12+33, mixed mode, sharing)
FileZilla_3.43.0_macosx-x86
服务器环境:
Ubuntu 16.04 64位
- 上传文件
用FileZilla将jdk-12.0.1_linux-x64_bin.tar.gz和apache-tomcat-9.0.21.tar.gz上传至服务器root目录下
- 安装jdk(在本机终端ssh进行)
- 在root目录下建立javaee文件夹
~# mkdir javaee
- 解压
~# tar zxvf jdk-12.0.1_linux-x64_bin.tar.gz -C javaee
- 配置java环境变量
这次不写JRE_HOME了
/etc/profile如下:
root@coconutnutA:~# vim /etc/profile
root@coconutnutA:~# source /etc/profile
root@coconutnutA:~# java -version
java version "12.0.1" 2019-04-16
Java(TM) SE Runtime Environment (build 12.0.1+12)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
- 安装tomcat
- 解压
~# tar zxvf apache-tomcat-9.0.21.tar.gz -C javaee
root@coconutnutA:~/javaee/apache-tomcat-9.0.21/bin# ./startup.sh
Using CATALINA_BASE: /root/javaee/apache-tomcat-9.0.21
Using CATALINA_HOME: /root/javaee/apache-tomcat-9.0.21
Using CATALINA_TMPDIR: /root/javaee/apache-tomcat-9.0.21/temp
Using JRE_HOME: /root/javaee/jdk-12.0.1
Using CLASSPATH: /root/javaee/apache-tomcat-9.0.21/bin/bootstrap.jar:/root/javaee/apache-tomcat-9.0.21/bin/tomcat-juli.jar
Tomcat started.
root@coconutnutA:~/javaee/apache-tomcat-9.0.21/bin# ./shutdown.sh
Using CATALINA_BASE: /root/javaee/apache-tomcat-9.0.21
Using CATALINA_HOME: /root/javaee/apache-tomcat-9.0.21
Using CATALINA_TMPDIR: /root/javaee/apache-tomcat-9.0.21/temp
Using JRE_HOME: /root/javaee/jdk-12.0.1
Using CLASSPATH: /root/javaee/apache-tomcat-9.0.21/bin/bootstrap.jar:/root/javaee/apache-tomcat-9.0.21/bin/tomcat-juli.jar
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
- 在浏览器打开
啊啊啊啊啊
???