Linux 下 yum 安裝jdk tomcat

1、 Linux 下 yum 安裝jdkjava

1.1 查看可安裝的jdk版本apache

yum -y list java*

1.2 安裝 jdkcentos

yum install -y java-1.8.0-openjdk-devel.x86_64

1.3 檢查tomcat

[root@VM-0-7-centos apache-tomcat-7.0.106]# java -version
openjdk version "1.8.0_272"
OpenJDK Runtime Environment (build 1.8.0_272-b10)
OpenJDK 64-Bit Server VM (build 25.272-b10, mixed mode)

1.4 查看jdk目錄jvm

/usr/lib/jvmui

[root@VM-0-7-centos apache-tomcat-7.0.106]# cd /usr/lib/jvm
[root@VM-0-7-centos jvm]# ll
total 4
drwxr-xr-x 3 root root 4096 Nov 16 21:57 java-1.8.0-openjdk-1.8.0.272.b10-1.el7_9.x86_64
lrwxrwxrwx 1 root root   21 Nov 16 21:57 jre -> /etc/alternatives/jre
lrwxrwxrwx 1 root root   27 Nov 16 21:57 jre-1.8.0 -> /etc/alternatives/jre_1.8.0
lrwxrwxrwx 1 root root   35 Nov 16 21:57 jre-1.8.0-openjdk -> /etc/alternatives/jre_1.8.0_openjdk
lrwxrwxrwx 1 root root   51 Nov 16 21:57 jre-1.8.0-openjdk-1.8.0.272.b10-1.el7_9.x86_64 -> java-1.8.0-openjdk-1.8.0.272.b10-1.el7_9.x86_64/jre
lrwxrwxrwx 1 root root   29 Nov 16 21:57 jre-openjdk -> /etc/alternatives/jre_openjdk

2、安裝tomcatcode

1. 上傳 apache-tomcat-7.0.106.tar.gz 至 /usr/local/tomcatit

2. 解壓 io

tar -xzvf apache-tomcat-7.0.106.tar.gz

3. 進入 解壓後的 文件夾 bin 目錄中class

./startup.sh 啓動
./shutdown.sh 關閉
./version.sh 查看版本
相關文章
相關標籤/搜索