我要评分
获取效率
正确性
完整性
易理解

Installing OpenJDK

Tomcat depends on the Java environment. Install OpenJDK or BiSheng JDK based on your actual requirements. The following uses JDK 8u411 as an example to describe how to install OpenJDK.

  1. Download the OpenJDK binary package.
    1. Download the OpenJDK binary package.

      Use a browser to go to the website Oracle Java SE 8 Archive Downloads. On this page, locate and download the file jdk-8u411-linux-aarch64.tar.gz, which is the JDK 8 version that is applicable for the Linux AArch64 architecture.

    2. Copy the OpenJDK binary package to the /home directory on the server and decompress it.
      cd /home
      tar -zxvf jdk-8u411-linux-aarch64.tar.gz
  2. Verify the availability of the OpenJDK binary file.
    cd /home/jdk1.8.0_411/bin
    ./java -version

    If the OpenJDK version information is returned, OpenJDK has been successfully downloaded and decompressed.

  3. Configure OpenJDK environment variables.
    1. Open the /etc/profile file.
      vi /etc/profile
    2. Press i to enter the insert mode and add the following content to the file:
      export JAVA_HOME=/home/jdk1.8.0_411
      export PATH=$JAVA_HOME/bin:$PATH
      export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
      export JRE_HOME=$JAVA_HOME/jre
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
    4. Make the configuration take effect.
      source /etc/profile