LMT 环境搭建
作者:互联网
LMT 环境搭建
JDK 环境
第一步:去oracle下载JDK 14
百度Java se
https://www.oracle.com/java/technologies/javase-downloads.html
https://download.oracle.com/otn-pub/java/jdk/14.0.1+7/664493ef4a6946b186ff29eb326336a2/jdk-14.0.1_linux-x64_bin.tar.gz?AuthParam=1588225616_9dae39408edc69d6ee882bb13edbbd84
第二步 上传,解压
mkdir /application
cd /application
tar -xvf jdk-14.0.1_linux-x64_bin.tar.gz
[root@web03 application]# ls
jdk-14.0.1 jdk-14.0.1_linux-x64_bin.tar.gz
[root@web03 ~]# ln -s /application/jdk-14.0.1 /application/jdk
第三步:配置环境变量
cat >> /etc/profile <<'EOF'
export JAVA_HOME=/application/jdk
export JRE_HOME=/application/jdk
export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
EOF
[root@web03 ~]# source /etc/profile
第四步:查看
[root@web03 ~]# java -version
java version "14.0.1" 2020-04-14
Java(TM) SE Runtime Environment (build 14.0.1+7)
Java HotSpot(TM) 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)
[root@web03 ~]#
Tomact
下载
https://tomcat.apache.org/download-80.cgi
上传,解压
[root@web03 ~]# tar xf /application/apache-tomcat-8.5.54.tar.gz -C /application/
[root@web03 ~]# ln -s /application/apache-tomcat-8.5.54/ /application/tomcat
更改配置文件:
echo 'export TOMCAT_HOME=/application/tomcat' >>/etc/profile
[root@web03 application]# source /etc/profile
查看版本信息
[root@web03 ~]# /application/tomcat/bin/version.sh
Using CATALINA_BASE: /application/tomcat
Using CATALINA_HOME: /application/tomcat
Using CATALINA_TMPDIR: /application/tomcat/temp
Using JRE_HOME: //application/jdk
Using CLASSPATH: /application/tomcat/bin/bootstrap.jar:/application/tomcat/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
Server version: Apache Tomcat/8.5.54
Server built: Apr 3 2020 14:06:10 UTC
Server number: 8.5.54.0
OS Name: Linux
OS Version: 3.10.0-957.el7.x86_64
Architecture: amd64
JVM Version: 14.0.1+7
JVM Vendor: Oracle Corporation
[root@web03 ~]#
启动
[root@web03 ~]# /application/tomcat/bin/startup.sh
Using CATALINA_BASE: /application/tomcat
Using CATALINA_HOME: /application/tomcat
Using CATALINA_TMPDIR: /application/tomcat/temp
Using JRE_HOME: //application/jdk
Using CLASSPATH: /application/tomcat/bin/bootstrap.jar:/application/tomcat/bin/tomcat-juli.jar
Tomcat started.
[root@web03 ~]# netstat -antup | grep 8080
tcp6 0 0 :::8080 :::* LISTEN 12690/java
[root@web03 ~]#
web 页面打开:
http://192.168.80.9:8080/
tomcat 目录说明
/bin:存放windows或Linux平台上启动和关闭Tomcat的脚本文件
/conf:存放Tomcat服务器的各种全局配置文件,其中最重要的是server.xml和web.xml
lib:存放Tomcat服务器以及所有web应用都可以访问的jar文件
/logs:存放Tomcat执行时的日志文件
/work:存放JSP编译后产生的class文件
/webapps:Tomcat的主要Web发布目录,默认情况下把Web应用文件放于此目录
标签:bin,tomcat,LMT,环境,application,web03,Using,root,搭建 来源: https://www.cnblogs.com/Ant-Hanks/p/12821041.html