二进制安装JDK和Tomcat
jdk 二进制包 yum list |grep java-11
server/tools 放压缩包,app/tools 软件目录
mkdir -p /server/tools /app/tools
JDK下载网址:https://www.oracle.com/java/technologies/downloads/
一、解压jdk
tar xf jdk-18_linux-x64_bin.tar.gz -C /app/tools/
二、制作快捷方式
ln -s /app/tools/jdk1.8.0_341/ /app/tools/jdk
三、配置环境变量(yum 安装不需要配置)
cat >>/etc/profile <<'EOF' export JAVA_HOME=/app/tools/jdk export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH export CLASSPATH=.$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$JAVA_HOME/lib/tools.jar export TOMCAT_HOME=/app/tomcat EOF
四、使profile生效
source /etc/profile
五、下载Tomcat
下载地址:https://tomcat.apache.org/,下列演示用的Tomcat下载地址:https://downloads.apache.org/tomcat/tomcat-9/v9.0.65/bin/apache-tomcat-9.0.65.tar.gz.asc
六、解压缩
tar apache-tomcat-9.0.65.tar.gz
制作软连接
ln -s apache-tomcat-9.0.65 tomcat
七、检查Tomcat和jdk是否正常
/app/tools/tomcat/bin/version.sh
八、启动Tomcat
/app/tools/tomcat/bin/starup.sh
九、查看Tomcat是否开启(启动的是Tomcat但进程名是叫Java)
ss -ntlup |grep java tcp LISTEN 0 100 :::8080 :::* users:(("java",pid=16816,fd=43)) tcp LISTEN 0 1 ::ffff:127.0.0.1:8005 :::* users:(("java",pid=16816,fd=51))
-------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------- 博客均为个人笔记,无所追求,仅供参考~~~ QQ--2382990774