Today we will continue to install jdk on the Alibaba Cloud service. You need to check whether Alibaba Cloud is 32-bit or 64-bit. If it is 32-bit, download the 32-bit package. If it is 64-bit, download the 64-bit package.
Mine is 64-bit. At first, I didn’t know how to distinguish 32/64-bit. It turns out that X64 is 64-bit. I also went to the ORACAL official website to download the 32-bit There is a problem with the database
Now I list the name of this package. jdk-7u25-linux-x64.rpm.X64 means 64-bit system.
First download the JDK package. Now I download the jdk-7u25-linux-x64.rpm package, and then upload it through XFTP
This XFTP communication system is already supported
.You just need to download an XFTP tool. The specific download address is on the official website of Alibaba Cloud.
After uploading, directly enter the installation instructions
# rpm -ivh /home/jdk-7u25-linux-x64.rpm
After installation, you can configure the environment.
Configure environment
[fff]]# vi ~/.bash
Type on open text
set JAVA_HOME=/usr/java/jdk1.7.0_25
export JAVA_HOME
set PATH=$JAVA_HOME/bin:$PATH
export PATH
set CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export CLASSPATH
After entering the result, press: wq and then press Enter
Restart your computer
[fff]]#reboot
After starting, enter the command to check whether the installation is correct.
#java -version
The following information is displayed to prove that the installation is successful.
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)