Centos install, configure, remove JDK

1. Download jdk

 

2. Installation

 

3. Configuration

Modify the configuration system configuration environment, add vi /etc/profile at the end:

## ---------------------  JDK -------------------------- ##

JAVA_HOME=/usr/java/jdk1.7.0_79
JRE_HOME=/usr/java/jdk1.7.0_79/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
export JAVA_HOME JRE_HOME PATH CLASSPATH

 

4. Assistance

In the /opt/soft/ directory, use the rm -rf jdk1.6.0_22 command to delete jdk

Then delete the configuration in /etc/profile

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327040324&siteId=291194637