4 comments 0

Linux Java server HTTP path configuration system environment test RPM Blog JDK

Abstract:

First, of course, download the JDK for Linux. Getconf LONG_BIT and download the corresponding JDK bit version.

Please indicate the source of reprint:

blog.csdn.net/qq_26525215




In this paper, from【 A Journey to College 】

First, download the JDK for Linux.

See how many bits you have in Linux:

getconf LONG_BITCopy the code

Then download the corresponding digital VERSION of the JDK

Jk-7u79-linux-x64.tar.gz 下载 : jk-7u79-linux-x64.tar.gz

First I created 2 folders:

mkdir -p /java/jdkCopy the code

Jk-7u79-linux-x64.tar. gz I put in the Java directory

java -version     # check whether JDK is installed on the serverCopy the code

I haven’t installed it yet

-bash: java: command not found

Unzip the configuration to install JDk1.7:

tar zxvf /java/jdk-7u79-linux-x64.tar.gz -C /java/jdkCopy the code

All decompressed into the JDK directory.

The mv command is used to rename the file:

Mv/Java/JDK/jdk1.7.0 _79 / Java/JDK/Java 7Copy the code

Add JDK1.7 to the system environment variable:

cp /etc/profile /etc/profile.bak    # backupCopy the code
vi /etc/profile     # Edit, add the following at the endCopy the code
export JAVA_HOME=/java/jdk/java7
export JRE_HOME=${JAVA_HOME}/jre  
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib  
export PATH=${JAVA_HOME}/bin:$PATH Copy the code

After editing, how to save and exit editing.

Press Esc – > :wq – > Enter

source/etc/profileMake the configuration file take effect immediatelyCopy the code

Test whether the installation is successful:

java -version       Check whether the test is successfulCopy the code

Jdk1.7 has been installed successfully.

If you download the JDK with the RPM suffix:

Install with this command

RPM -ivh ***(the name of the file you downloaded).rpmCopy the code

Will be installed in the /usr/java directory

This article was prepared by Wang Yi. All rights reserved.

Please indicate the source of reprint:

blog.csdn.net/qq_26525215




In this paper, from【 A Journey to College 】

Copyright Notice: The content of this article is contributed by Internet users, the community does not have the ownership, also does not assume the relevant legal responsibility. If you find any content suspected of plagiarism in our community, you are welcome to send an email to [email protected] to report and provide relevant evidence. Once verified, our community will immediately delete the content suspected of infringement.

The original link