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

Setting Up the Environment

Hardware Environment

Table 1 shows the compiler hardware configurations.

Table 1 Recommended hardware configurations for the compiler

Item

Requirement

Server

TaiShan server (model 2280)

Processor

Huawei Kunpeng processor

Memory size

32 GB or above

Drive

480 GB or above

Software Environment

Table 2 shows the compiler software configurations.

Table 2 Recommended software configurations for the compiler

Item

Software Version

OS

CentOS 7.6

JDK

OpenJDK 1.8.0_252

Maven

3.6.3

Scala

2.11.8

Installing JDK

  1. Download the JDK installation package and decompress it to the installation directory.
    wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/ OpenJDK8U-jdk_aarch64_linux_hotspot_8u252b09.tar.gz
    tar -zxf OpenJDK8U-jdk_aarch64_linux_hotspot_8u252b09.tar.gz -C /usr/local
  2. Configure the JDK environment variables.
    1. Open the /etc/profile file.
      vim /etc/profile
    2. Add the JDK path to the profile file.
      export JAVA_HOME=/usr/local/jdk8u252-b09 export PATH=$JAVA_HOME/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

Installing Maven

  1. Download the installation package and install Maven to a directory (for example, /opt/tools/installed).
    wget https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz tar -zxf apache-maven-3.6.3-bin.tar.gz mv apache-maven-3.6.3 /opt/tools/installed/
  2. Modify the Maven environment variables.
    1. Open the /etc/profile file.
      vim /etc/profile
    2. Add the following code at the end of the /etc/profile file:
      export MAVEN_HOME=/opt/tools/installed/apache-maven-3.6.3 export PATH=$MAVEN_HOME/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. Check whether the configuration takes effect.
    mvn -v

  5. Modify the local repository path and remote repository in the Maven configuration file. Configuration file path: /opt/tools/installed/apache-maven-3.6.3/conf/settings.xml

    The default local repository directory is ~/.m2/. If you want to change the directory, modify the localRepository tag. You do not need to modify this parameter unless otherwise specified.

    Add the following content to the <mirrors> tag to configure the remote repository (change the repository to the Maven repository that you have built. If the Maven repository does not exist, configure it based on the following example):
    <mirrors>
    <id>mirrors.huaweicloud.com</id>
    <url>https://mirrors.huaweicloud.com/kunpeng/maven</url>
    <name>mirrors huaweicloud com</name>
    <snapshots>
    <enabled>false</enabled>
    </snapshots>
    </mirrors>
    <mirrors>
    <id>repository.huaweicloud.com</id>
    <url>https://mirrors.huaweicloud.com/repository/maven</url>
    <name>repository huaweicloud com</name>
    <snapshots>
    <enabled>false</enabled>
    </snapshots>
    </mirrors>
    If a proxy is used, add the proxy configuration to the settings.xml file. The details are as follows:
    <proxies>
    <proxy>
    <id>optional</id>
    <active>true</active>
    <protocol>http</protocol>
    <username>User_name</username>
    <password>Password</password>
    <host>Proxy_server_URL</host>
    <port>Proxy_server_port</port>
    <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
    </proxy> </proxies>