CentOS Discovery Road 2---Use rpm to install JDK

Install jdk using rpm

​ In the previous Linux exploration article http://www.cnblogs.com/Kidezyq/p/8782728.html, there is a command to install native OpenJDK through the yum instruction. At that time, a great god gave a comment, suggesting that it is best to install sun's JDK. I searched the Internet for the difference between JDK and OpenJDK, and it can be generally considered that OpenJDK is a simplified version of JDK. The specific difference can refer to this knowing question: https://www.zhihu.com/question/19646618

​ Not much to say, here is the process of re-installing sun's JDK using rpm after installing OpenJDK:

export JAVA_HOME=/usr/java/jdk1.8.0_171-amd64 export CLASSPATH=.:JAVA_HOME/jre/lib/rt.jar:JAVA_HOME/lib/dt.jar:JAVA_HOME/lib/tools.jar export PATH=JAVA_HOME/bin:$PATH


Tips

1. Related parameter description of rpm command:
 - a: Query all packages;
- b<Completion stage><Package file>+or-t <Completion stage><Package file>+:设置包装套件的Completion stage,并指定Package file的文件名称;
- c: Only configuration configuration files are listed, this parameter needs to cooperate"-l"Parameter usage;
- d: Only text files are listed, this parameter needs to cooperate"-l"Parameter usage;
- e<Package file>or--erase<Package file>: Delete the specified package;
- f<file>+:查询拥有指定file的套件;
- h or--hash: List the tags when the kit is installed;
- i: Display related information of the kit;
- i<Package file>or--install<Package file>:安装指定的Package file;
- l: Display the file list of the suite;
- p<Package file>+:查询指定的RPMPackage file;
- q: Use the query mode, when encountering any problems, the rpm command will first ask the user;
- R: Display the relevance information of the kit;
- s: display the file status, this parameter needs to cooperate"-l"Parameter usage;
- U<Package file>or--upgrade<Package file>:升级指定的Package file;
- v: Display the execution process of instructions;
- vv: Display the instruction execution process in detail for easy troubleshooting.

2. How to find the path where the rpm installation software is located:
a.First pass`rpm -qa|grep jdk`Find the jdk installed via rpm
b.Pass again`rpm -ql XXX`Find it

Recommended Posts

CentOS Discovery Road 2---Use rpm to install JDK
How to install jdk1.8 on centOS7
Install JDK8 in rpm on CentOS7
Use VMware15 to install Linux (CentOS6.5)
CentOS install jdk
Three ways to install JDK under CentOS
How to install offline JDK1.8 on centos7.0
Centos8 use yum to install rabbitmq tutorial
Use CentOS 7.5 to uninstall the built-in jdk and install your own JDK1.8
How to install and use Docker on CentOS 7
How to install RPM packages on CentOS Linux
Linux (CentOS7) using RPM to install mysql 8.0.11 tutorial
Linux Centos7 install jdk1.8
How to install and use Composer on CentOS 8
CentOS7 install JDK8, tomcat8
How to install jdk1.8.0_151 and mysql5.6.38 on centos7.2.1511
How to install and use Curl on CentOS 8
Centos 7 install JDK (Linux install jdk)
How to install and use Cockpit on CentOS 8/RHEL 8
CentOS 7 install JAVA environment (JDK 1.8)
Centos7.6 method to install Tomcat-8.5.39
Tencent Cloud Centos install jdk8
Install Java JDK8 under CentOS6
5.1. CentOS@ install JDK1.8 graphic tutorial
Centos 7 install jdk and package service service
How to install MySQL on CentOS 8
How to install Memcached on CentOS 8
How to install R on CentOS 8
How to install FFmpeg on CentOS 8
How to install Virtualbox on CentOS 8
How to install TensorFlow on CentOS 8
[Introduction to redis] Install redis under Centos
Minimal install JDK 1.8 tutorial in CentOS 7
How to install TeamViewer on CentOS 8
How to install Perl 5 on CentOS
How to install Git on CentOS 8
How to install PHP7.4 in CentOS
How to install Gradle on CentOS 8
How to install Elasticsearch on CentOS 8
How to install Jenkins on CentOS 8
How to install Java on CentOS 8
How to install Go on CentOS 8
CentOS8 install jdk8 / java8 tutorial (recommended)
Linux CentOS 7 install JDK detailed steps
How to install GCC on CentOS 8
How to install Yarn on CentOS 8
How to install Nginx on CentOS 8
How to install Asterisk on CentOS 7
How to install Jenkins on CentOS 8
CentOS7.3 install iptables and detailed use
How to install Vagrant on CentOS 8
How to install Python 3.8 on CentOS 8
How to install Tomcat 9 on CentOS 8
How to install Webmin on CentOS 8
How to install Ruby on CentOS 8
How to install Skype on CentOS 8
Centos7 uninstall openJdk, and install JDK1.8
How to install htop on CentOS 8
How to install Python on CentOS 8
Install and use docker under CentOS 6.8
How to install Elasticsearch on CentOS 8