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.
How to install the Java environment on CentOS using the Yum method, the system takes CentOS6.5 as an example. Tools/Materials
Java JDK
Yum Library
CentOS6.5
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* (java-1.7.0-openjdk.x86_64), take java-1.7.0 in the Yum repository 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.
6 Java version Information that was just installed.
Input: Java-version to view Java version;
Input: Javac can view the Java compiler command usage (optional).
OpenJDK methods to support HTTPS
1. Yum Install nss.x86_64 Download the latest NSS version
2.${jre_home}/lib/security/java.security Default in/usr/lib/jvm/jre
Open 10 Support: SECURITY.PROVIDER.10=SUN.SECURITY.PKCS11.SUNPKCS11 ${java.home}/lib/security/nss.cfg
This method can solve the problem of incompatible default HTTPS certificate under OPENJDK!
Installing the Java environment on CentOS-openjdk1.7 Troubleshooting HTTPS configuration issues