Installing Dependencies
- Download and install epel-release (for CentOS only).
- Download the epel-release RPM package.
1wget https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm --no-check-certificate
- Install epel-release.
1rpm -ivh epel-release-7-12.noarch.rpm
- Download the epel-release RPM package.
- Install related dependencies in Yum mode.
- CentOS:
1yum install java-1.8.0-openjdk-* git gcc gcc-c++ make epel-release clang openssl openssl-devel npm curl -y
- openEuler:
1yum install java-1.8.0-openjdk-* git gcc gcc-c++ make clang openssl openssl-devel npm curl -y
- CentOS:
- Configure Java.
- View the Java installation directory.
find /usr/lib/jvm/ -name java
Alternatively,find / -name java
Alternatively,which java
- CentOS:
ls /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64/bin/java
- openEuler:
ls /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64/bin/java
- CentOS:
- Configure the environment variables: JAVA_HOME, JRE_HOME, CLASSPATH, and PATH.
- Open the profile file.
vim /etc/profile
- Add the content of the corresponding system to the profile file.
- CentOS:
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64 export JRE_HOME=$JAVA_HOME/jre export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.292.b10-1.el7_9.aarch64/bin:$PATH
- openEuler:
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64 export JRE_HOME=$JAVA_HOME/jre export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.272.b10-7.oe1.aarch64/bin:$PATH
- CentOS:
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the profile file.
- Make the environment variables take effect.
source /etc/profile
- View the environment variables.
echo $JAVA_HOME echo $JRE_HOME echo $CLASSPATH echo $PATH
- View the Java version.
java -version
- View the Java installation directory.
Parent topic: Configuring the Compilation Environment



