Server JDK configuration

1. Upload jdk to the remote server

Can use filezilla for file upload

2. Enter the configuration file to configure

vi /etc/profile.d/java.sh

3. Add configuration information

JAVA_HOME=/usr/java/jdk1.8.0_161
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export  PATH=${JAVA_HOME}/bin:$PATH
export MAVEN_HOME=/work/maven/apache-maven-3.5.2
export PATH=${PATH}:${MAVEN_HOME}/bin
export ZOOKEEPER_INSTALL=/work/zookeeper/zookeeper-3.4.11

export PATH=$PATH:$ZOOKEEPER_INSTALL/bin

4. Save and exit

:wq

5. Load the setting information and make it effective

source /etc/profile

6. Verify that the configuration is successful

java -version

If jdk information appears, the configuration is successful

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325752265&siteId=291194637