使用 yum 安装软件以及查看安装路径

1.查看 yum 库中都有哪些 jdk 版本。
[root@ageovb ~] # yum search java|grep jdk
2.选择指定的版本安装,注意最后的 * 以及 yum 源安装的是 openjdk ,注意 openjdk 的区别。
[root@ageovb ~] # yum install java-1.8.0-openjdk*
3.安装完成后查看版本信息。
[root@ageovb ~] # java -version
4.查找 jdk 的安装包。
[root@ageovb ~] # rpm -qa | grep jdk

java-1.8.0-openjdk-headless-1.8.0.242.b08-1.el7.x86_64
java-1.8.0-openjdk-devel-1.8.0.242.b08-1.el7.x86_64
java-1.8.0-openjdk-javadoc-zip-1.8.0.242.b08-1.el7.noarch
copy-jdk-configs-3.3-10.el7_5.noarch
java-1.8.0-openjdk-1.8.0.242.b08-1.el7.x86_64
java-1.8.0-openjdk-accessibility-1.8.0.242.b08-1.el7.x86_64
java-1.8.0-openjdk-demo-1.8.0.242.b08-1.el7.x86_64
java-1.8.0-openjdk-javadoc-1.8.0.242.b08-1.el7.noarch
java-1.8.0-openjdk-src-1.8.0.242.b08-1.el7.x86_64

5.查找安装包的安装路径。
[root@ageovb ~]# rpm -ql java-1.8.0-openjdk-1.8.0.242.b08-1.el7.x86_64

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-1.el7.x86_64/jre/bin/policytool
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-1.el7.x86_64/jre/lib/amd64/libawt_xawt.so
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-1.el7.x86_64/jre/lib/amd64/libjawt.so
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-1.el7.x86_64/jre/lib/amd64/libjsoundalsa.so
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-1.el7.x86_64/jre/lib/amd64/libsplashscreen.so
/usr/share/applications/java-1.8.0-openjdk-1.8.0.242.b08-1.el7.x86_64-policytool.desktop
/usr/share/icons/hicolor/16x16/apps/java-1.8.0-openjdk.png
/usr/share/icons/hicolor/24x24/apps/java-1.8.0-openjdk.png
/usr/share/icons/hicolor/32x32/apps/java-1.8.0-openjdk.png
/usr/share/icons/hicolor/48x48/apps/java-1.8.0-openjdk.png
posted @ 2020-04-29 13:59  ageovb  阅读(281)  评论(0编辑  收藏  举报