Install java in yum mode in Centos

Check whether the JDK that comes with CentOS has been installed.
◆Input: yum list installed |grep java.

If there is a built-in JDK, how to uninstall the Java environment that comes with CentOS?
◆Uninstall JDK related files input: yum -y remove java-1.7.0-openjdk*.
◆Uninstall tzdata-java input: yum -y remove tzdata-java.noarch.
When the result is displayed as Complete! The uninstallation is complete.
Note: "*" means to uninstall all openjdk related files of java 1.7.0.

Check whether the CentOS system network connection is normal.
◆Using yum method to install needs to connect to the network to download the corresponding Java installation files, so you need to use the ping command to test the network; for example, ping Baidu URL.

Check the Java installation package in the yum library.
◆Input: yum -y list java*.

[ root@beta-new1 www]# yum -y list java*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

Take java-1.7.0 in yum library as an example
Note: "" means to install all relevant Java programs of java-1.7.0.
[ root@beta-new1 www]# yum -y install java-1.7.0-openjdk

Check the version of Java just installed.
◆Enter: java -version to view the Java version;
◆Input: javac to view the usage of Java compiler commands

Recommended Posts

Install java in yum mode in Centos
CentOS 7 install Java 1.8
CentOS 7 install Java 1.8
Compile and install nodejs and yum in Centos8
Install Docker CE in yum under CentOS 7
Centos7 YUM install MariaDB 10.0
Install Java on Centos 7
Install MySQL5.7 in centos7
CentOS 7.2 Yum install MySQL 5.6
Install redis5.0 in CentOS7
Centos7 YUM install MariaDB 10.0
CentOS 7 install JAVA environment (JDK 1.8)
CentOS6.5 install Java 8 and Tomcat8
Install Java JDK8 under CentOS6
CentOS6.5 install Java 8 and Tomcat8
CentOS6.5 install Java 8 and Tomcat8
CentOS 7 yum install PHP7.3 tutorial
CentOS7 yum install and start mysql
Install JDK8 in rpm on CentOS7
CentOS Yum compile and install MySQL 5.6
Minimal install JDK 1.8 tutorial in CentOS 7
Tencent Cloud Centos7 install java server
How to install PHP7.4 in CentOS
Install MySql with Docker in CentOS7
How to install Java on CentOS 8
CentOS8 install jdk8 / java8 tutorial (recommended)
Install Percona Server database (in CentOS 8)
CentOS7 yum install and start mysql
Centos yum install mysql5.6 or above
How to install HDP2.6 in Centos7.2
Install Centos7 operating system in Docker
1.5 Install Centos7
Install and configure FreeIPA in Centos7
Build Yum private warehouse in Centos7.3
How to install Android SDK in centos7
CentOS yum install Apache + PHP + Tomcat7 + MySQL
Centos8 uses yum to install mongodb 4.2 method
Centos7 uses yum to install pip, ipython
Centos8 use yum to install rabbitmq tutorial
CentOS7 system yum way to install MySQL5.7
Centos6 install Python2.7.13
Centos7.3 install nginx
CentOS7.2 install Mysql5.7.13
CentOS install Redmine
Centos7 install Python 3.6.
CentOS7 install MySQL
Centos7 install protobuf
CentOS 7 install Docker
CentOS 7.4 install Zabbix 3.4
CentOS7 install Docker
Centos6.5 install Tomcat
CentOS install Python 3.6
Vmware install CentOS6
centos7 install docker-ce 18.01.0
CentOS 7.2 install MariaDB
CentOS 7 install Hadoop 3.0.0
Centos7 install Python2.7
Centos 7.6 install seleniu
CentOS 7.3 install Zabbix3
Centos7 install LAMP+PHPmyadmin
CentOS install mysql