Long-Term Supported Versions

    Innovation Versions

      Preparations for Development Environment

      Environment Requirements

      • If physical machines (PMs) are used, the minimum hardware requirements of the development environment are described in Table 1.

        Table 1 Minimum hardware specifications

        Component

        Minimum Hardware Specification

        Description

        Architecture

        • AArch64
        • x86_64
        • 64-bit Arm architecture
        • 64-bit Intel x86 architecture

        CPU

        • Huawei Kunpeng 920 series
        • Intel ® Xeon® processor

        -

        Memory

        ≥ 4 GB (8 GB or higher recommended for better user experience)

        -

        Hard disk

        ≥ 120 GB (for better user experience)

        IDE, SATA, SAS interfaces are supported.

      • If virtual machines (VMs) are used, the minimum virtualization space required for the development environment is described in Table 2.

        Table 2 Minimum virtualization space

        Component

        Minimum Virtualization Space

        Description

        Architecture

        • AArch64
        • x86_64

        -

        CPU

        Two CPUs

        -

        Memory

        ≥ 4 GB (8 GB or higher recommended for better user experience)

        -

        Hard disk

        ≥ 32 GB (120 GB or higher recommended for better user experience)

        -

      OS Requirements

      The openEuler OS is required.

      For details about how to install the openEuler OS, see the Installation Guide. On the SOFTWARE SELECTION page, select Development Tools in the Add-Ons for Selected Environment area.

      Configuring the openEuler Yum Source

      Configure an online Yum source using the online openEuler repo source. Alternatively, configure a local Yum source by mounting an ISO file and creating a local openEuler repo source.

      Configuring an Online Yum Source by Obtaining the Online openEuler Repo Source

      NOTE: openEuler provides multiple repo sources for users online. For details about the repo sources, see Installing the OS. This section uses the OS repo source file of the AArch64 architecture as an example.

      1. Go to the yum source directory and check the .repo configuration file.

        $ cd /etc/yum.repos.d
        $ ls 
        openEuler-xxx.repo
        
      2. Edit the openEuler-xxx.repo file as the root user. Configure the online openEuler repo source as the yum source.

        vi openEuler-xxx.repo
        

        Edit the openEuler-xxx.repo file as follows:

        [osrepo]
        name=osrepo
        baseurl=http://repo.openeuler.org/openEuler-{version}/OS/{arch}/
        enabled=1
        gpgcheck=1
        gpgkey=http://repo.openeuler.org/openEuler-{version}/OS/{arch}/RPM-GPG-KEY-openEuler
        

        NOTE:

        • repoid indicates the ID of the software repository. Repoids in all .repo configuration files must be unique. In the example, repoid is set to base.
        • name indicates the string that the software repository describes.
        • baseurl indicates the address of the software repository.
        • enabled indicates whether to enable the software source repository. The value can be 1 or 0. The default value is 1, indicating that the software source repository is enabled.
        • gpgcheck indicates whether to enable the GNU privacy guard (GPG) to check the validity and security of sources of RPM packages. 1 indicates GPG check is enabled. 0 indicates the GPG check is disabled. If this option is not specified, the GPG check is enabled by default.
        • gpgkey indicates the public key used to verify the signature.

      Configuring a Local Yum Source by Mounting an ISO File

      NOTE: openEuler provides multiple ISO release packages. For details about each ISO release package, see OS Installation. This section does not specify the version and architecture of related files. Choose them based on the actual requirements.

      1. Download the ISO release package.

        • Download an ISO image using a cross-platform file transfer tool.

          1. Visit the openEuler community.

          2. Choose Downloads > Community Editions.

          3. Locate the target version. Then, click Download. The download list is displayed.

          4. The download list includes the following architectures:

            • x86_64: ISO of the x86_64 architecture.
            • AArch64: ISO of the AArch64 architecture.
            • ARM32: ISO for embedded devices.
          5. Click AArch64 and Server.

          6. Choose the required ISO type and click Download to download the openEuler release package to the local host.

          7. Click SHA256 to copy the checksum. Save the checksum as a local verification file.

          8. Log in to the openEuler OS and create a directory for storing the release package and verification file, for example, ~/iso.

            mkdir ~/iso
            
          9. Use a cross-platform file transfer tool (such as WinSCP) to upload the local openEuler release package and verification file to the openEuler OS.

        • Run the wget command to download the ISO image.

          1. Visit the openEuler community.

          2. Choose Downloads > Community Editions.

          3. Locate the target version. Then, click Download. The download list is displayed.

          4. The download list includes the following architectures:

            • x86_64: ISO of the x86_64 architecture.
            • AArch64: ISO of the AArch64 architecture.
            • ARM32: ISO for embedded devices.
          5. Click AArch64.

          6. Click Server.

          7. Choose the required ISO type, right-click Download, and copy the link address.

          8. Right-click SHA256 and copy the link address.

          9. Log in to the openEuler OS, create a directory for storing the release package and verification file, for example, ~/iso. Then switch to the directory.

            mkdir ~/iso
            cd ~/iso
            
          10. Run the wget command to remotely download the release package and verification file. In the command, replace ipaddriso with the address copied in steps 7.

            wget ipaddriso
            
      2. Release Package Integrity Check

        1. Calculate the SHA256 verification value of the openEuler release package.

          sha256sum openEuler-xxx-dvd.iso
          

          After the command is run, the verification value is displayed.

        2. Check whether the calculated value is the same as that of the saved SHA256 value.

          If the verification values are consistent, the .iso file is not damaged. If they are inconsistent, the file is damaged and you need to obtain the file again.

      3. Mount the ISO file and configure it as a repo source.

        mount /home/iso/openEuler-xxx-dvd.iso /mnt/
        
        .
        │── boot.catalog
        │── docs
        │── EFI
        │── images
        │── Packages
        │── repodata
        │── TRANS.TBL
        └── RPM-GPG-KEY-openEuler
        

        In the preceding directory, Packages indicates the directory where the RPM package is stored, repodata indicates the directory where the repo source metadata is stored, and RPM-GPG-KEY-openEuler indicates the public key for signing openEuler.

      4. Go to the yum source directory and check the .repo configuration file in the directory.

        $ cd /etc/yum.repos.d
        $ ls 
        openEuler-xxx.repo
        
      5. Edit the openEuler-xxx.repo file as the root user. Configure the local openEuler repo source created in step 3 as the yum source.

        vi openEuler-xxx.repo
        

        Edit the openEuler-xxx.repo file as follows:

        [localosrepo]
        name=localosrepo
        baseurl=file:///mnt
        enabled=1
        gpgcheck=1
        gpgkey=file:///mnt/RPM-GPG-KEY-openEuler
        

      Installing the Software Packages

      The software required varies in different development environments. However, the installation methods are the same. This section describes how to install common software packages (such as JDK and rpm-build). Some development software, such as GCC and GNU make, is provided by the openEuler OS by default.

      Installing the JDK Software Package

      1. Run the dnf list installed | grep jdk command to check whether the JDK software is installed.

        Check the command output. If the command output contains "jdk", the JDK has been installed. If no such information is displayed, the software is not installed.

      2. Run dnf clean all to clear the cache.

      3. Run dnf makecache to create the cache.

      4. Run dnf search jdk | grep jdk to query the JDK software package that can be installed.

        View the command output and install the java-{version}-openjdk-devel.aarch64 software package.

      5. Install the JDK software package as the root user. Run dnf install java-{version}-openjdk-devel.aarch64.

      6. Query information about the JDK software by running java -version.

        Check the command output. If the command output contains "openjdk version", the JDK has been correctly installed.

      Installing the rpm-build Software Package

      1. Run the dnf list installed | grep rpm-build command to check whether the rpm-build software is installed.

        Check the command output. If the command output contains "rpm-build", the software has been installed. If no such information is displayed, the software is not installed.

      2. Run dnf clean all to clear the cache.

      3. Run dnf makecache to create the cache.

      4. Install the rpm-build package as the root user. Run dnf install rpm-build.

      5. Query the rpm-build software version. Run rpmbuild --version.

      Using the IDE for Java Development

      For small-sized Java applications, you can directly use JDK to compile them to run Java applications. However, for medium- and large-sized Java applications, this method does not meet the development requirements. You can perform the following steps to install and use the IDE to facilitate Java development on the openEuler OS.

      Overview

      IntelliJ IDEA is a popular Java IDE. You can download the community edition of IntelliJ IDEA for free. Currently, openEuler supports Java development using IntelliJ IDEA, improving the work efficiency of developers.

      Logging In to the Server Using MobaXterm

      MobaXterm is an excellent SSH client. It has an X Server and can easily solve remote GUI display problems.

      You need to download, install, and start MobaXterm in advance, and then log in to your server in SSH mode to perform the following operations.

      Setting the JDK Environment

      Before setting JAVA_HOME, you need to find the installation path of the JDK. You are supported to have installed the JDK. If you have not installed the JDK, install it by referring to the preceding section "Installing the JDK Software Package".

      Run the following commands to view the Java path:

      $ which java
      /usr/bin/java
      

      Run the following commands to check the directory to which the soft link points:

      $ ls -la /usr/bin/java
      lrwxrwxrwx. 1 root root  22 Mar 6 20:28 /usr/bin/java -> /etc/alternatives/java
      $ ls -la /etc/alternatives/java
      lrwxrwxrwx. 1 root root  83 Mar 6 20:28 /etc/alternatives/java -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-1.h2.aarch64/jre/bin/java
      

      /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-1.h2.aarch64 indicates the actual JDK path. Run the following commands to set JAVA_HOME and PATH:

      export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-1.h2.aarch64
      export PATH=$JAVA_HOME/bin:$PATH
      

      Downloading and Installing the GTK Library

      Run the following command:

      dnf list installed | grep gtk
      

      If gtk2 or gtk3 is displayed, the GTK library has been installed. In this case, skip this step. Otherwise, run the following command as the root user to automatically download and install the GTK library:

      dnf -y install gtk2 libXtst libXrender  xauth
      

      Setting X11 Forwarding

      Switch to the SSHD configuration directory.

      cd ~/.ssh
      

      If the directory does not exist, run the following command to create it and then switch to it:

      mkdir ~/.ssh
      

      Edit the configuration file in the .ssh directory and save the file.

      1. Run the vim command to open the configuration file.

        vim config
        
      2. Add the following content to the end of the file and save the file:

        Host *
            ForwardAgent yes
            ForwardX11 yes
        

      Downloading and Running IntelliJ IDEA

      After the preceding environment configuration is complete, you can download and run IntelliJ IDEA. The latest version of IntelliJ IDEA is incompatible with openEuler in some functions. You are advised to click here to download the Linux package of the 2018 version. Move the downloaded package to the directory where you want to install the software and decompress the package.

      tar xf ideaIC-2018.3.tar.gz
      

      After the decompression is complete, switch to the IntelliJ IDEA directory and run IntelliJ IDEA.

      cd ./idea-IC-183.4284.148
      bin/idea.sh &
      

      Bug Catching

      Buggy Content

      Bug Description

      Submit As Issue

      It's a little complicated....

      I'd like to ask someone.

      PR

      Just a small problem.

      I can fix it online!

      Bug Type
      Specifications and Common Mistakes

      ● Misspellings or punctuation mistakes;

      ● Incorrect links, empty cells, or wrong formats;

      ● Chinese characters in English context;

      ● Minor inconsistencies between the UI and descriptions;

      ● Low writing fluency that does not affect understanding;

      ● Incorrect version numbers, including software package names and version numbers on the UI.

      Usability

      ● Incorrect or missing key steps;

      ● Missing prerequisites or precautions;

      ● Ambiguous figures, tables, or texts;

      ● Unclear logic, such as missing classifications, items, and steps.

      Correctness

      ● Technical principles, function descriptions, or specifications inconsistent with those of the software;

      ● Incorrect schematic or architecture diagrams;

      ● Incorrect commands or command parameters;

      ● Incorrect code;

      ● Commands inconsistent with the functions;

      ● Wrong screenshots.

      Risk Warnings

      ● Lack of risk warnings for operations that may damage the system or important data.

      Content Compliance

      ● Contents that may violate applicable laws and regulations or geo-cultural context-sensitive words and expressions;

      ● Copyright infringement.

      How satisfied are you with this document

      Not satisfied at all
      Very satisfied
      Submit
      Click to create an issue. An issue template will be automatically generated based on your feedback.
      Bug Catching
      编组 3备份