Rate This Document
Findability
Accuracy
Completeness
Readability

Installing Dependencies

  1. Download and install the dependencies.
    1
    yum install java-1.8.0-openjdk-* git gcc gcc-c++ make cmake3 libtool autoconf automake openssl-devel ninja-build golang apr-devel -y
    

    If no available package is displayed when installing CMake, ninja-build, or Golang on CentOS, install the epel-release software package and run the installation command in 1 again.

    1. Download the epel-release RPM package.
      1
      wget https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm --no-check-certificate
      
    2. Install epel-release.
      1
      rpm -ivh epel-release-7-12.noarch.rpm
      
    3. Regenerate the local Yum source.
      1
      2
      yum clean all
      yum makecache
      
    4. View CMake, ninja-build, and Golang.
      1
      2
      3
      yum search cmake
      yum search ninja-build
      yum search golang
      
  2. Create CMake and ninja soft links for CMake 3 and ninja-build, respectively.
    1
    2
    ln -s /usr/bin/cmake3 /usr/bin/cmake
    ln -s /usr/bin/ninja-build /usr/bin/ninja
    

    CMake later than version 3 and Ninja are required for the compilation. However, CMake 3 and ninja-build installed by Yum cannot be identified during compilation. You need to create soft links for CMake 3 and ninja-build.

  3. Check whether CMake is available.
    If a CMake version is displayed, CMake is available.
    1
    cmake --version
    
  4. Check whether ninja is available.
    If a ninja version is displayed, ninja is available.
    1
    ninja --version
    
  5. Configure Java.
    1. 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
    2. Configure the environment variables: JAVA_HOME, JRE_HOME, CLASSPATH, and PATH.
      1. Open the profile file.
        vim /etc/profile
      2. 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
      3. Press Esc, type :wq!, and press Enter to save the file and exit.
    3. Make the environment variables take effect.
      source /etc/profile
    4. View the environment variables.
      echo $JAVA_HOME
      echo $JRE_HOME
      echo $CLASSPATH
      echo $PATH
      • CentOS:

      • openEuler:

    5. View the Java version.
      java -version
      • CentOS:

      • openEuler: