Installing the Java Environment on CentOS: [1] installing Java with Yum
At present, enterprise-level project development is generally implemented in the Java language. The development of the project needs to be put on the server to run tests, if the CentOS system as a server system, the first thing to solve is the CentOS system on the Java environment to build.
Let me share with you: How to install Java environment on CentOS using the Yum method, CentOS6.4 for example
Tools/Materials
-
Java JDK
-
Yum Library
-
CentOS6.4
Method/Step
-
Check to see if the CentOS JDK is installed.
Input: Yum list installed |grep java.
-
How do I uninstall a CentOS system with a Java environment if I have a self-installing JDK?
Uninstall JDK-related file input: yum-y remove java-1.7.0-openjdk*.
Uninstall Tzdata-java Input: Yum-y remove Tzdata-java.noarch.
When the results are displayed as complete! The uninstallation is complete.
Note: "*" means uninstalling all OPENJDK related files for Java 1.7.0.
-
Check that the CentOS system network connection is working properly.
Using the Yum installation requires a connection to the network to download Java installation files, so you need to use the ping command to test the network, such as: ping Baidu URL.
-
View the Java installation package in the Yum Library.
Input: Yum-y list java*.
-
Install the Java environment using Yum.
Input: yum-y install java-1.7.0-openjdk*, take java-1.7.0 in the Yum library as an example.
When the results are displayed as complete! The installation is complete.
Note: "*" means that all relevant Java programs for java-1.7.0 are installed.
-
View the Java version information you just installed.
Input: Java-version to view Java version;
Input: Javac can view the Java compiler command usage (optional).
How to build a Java environment in the CentOS environment