1. Find the Java related list:
[root@localhost ~]# yum -y list java*
2. Install with root user
When installing, it is reminded that you must use the root user, and sudo will not work.
[root@localhost ~]$ yum -y installjava-1.8.0-openjdk*
3. Check if the installation is successful:
[root@localhost ~]# java -version
4. The path of the Java installation:
root@localhost ~]# ls /usr/lib/jvm
5. 如果yum提示Another app is currently holding the yum lock; waiting for it toexit...
(1) Use the yum installation scheduled task function to prompt the ongoing task:
[root@localhost ~]# yum -y install vixie-cron
(2) Use skill to close it
(3) If not, forcibly close the yum process:
[root@localhost ~]# rm -f /var/run/yum.pid