Install JDK in Linux. Install jdk in linux
Prepare networked Linux systems with known IP addresses; Xftp software; jdk-8u45-linux-x64.rpm files; Xshell software; Use Xftp to upload jdk-8u45-linux-x64.rpm files in Windows to Linux systems for convenience, upload the jdk-8u45-linux-x64.rpm file to the Linux root directory this time; connect to the Linux System Using Xshell software; unzip the jdk-8u45-linux-x64.rpm File 」
RPMs-ivh/jdk-8u45-linux-x64.rpm
Rename a folder
Mv/usr/java/jdk1.8.0 _ 45/usr/java/jdk1.8
The mv command can be used to move or rename a file.
Eg. Rename directory A to B --- mv A B
Eg. Move the/a directory to/B and rename it to c --- mv/a/B/c.
Configure Environment Variables
Vi/etc/profile
Enter edit mode and enter the following content:
########### JDK ###########
JAVA_HOME =/usr/java/jdk1.8
PATH = $ JAVA_HOME/bin: $ PATH
CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
Export JAVA_HOME
Export PATH
Export CLASSPATH
Save and exit
Make environment variables take effect
Source/etc/profile
Check whether JDK configuration takes effect
Javac-version