Updated on 2025-07-21 GMT+08:00

Installing x2hce-ca

  1. Confirm that the repository is configured correctly.

    Check whether the parameters in the /etc/yum.repos.d/hce.repo file are configured correctly. The correct configuration is as follows:

    [base]
    name=HCE $releasever base
    baseurl=https://repo.huaweicloud.com/hce/$releasever/os/$basearch/
    enabled=1
    gpgcheck=1
    gpgkey=https://repo.huaweicloud.com/hce/$releasever/os/RPM-GPG-KEY-HCE-2
    
    [updates]
    name=HCE $releasever updates
    baseurl=https://repo.huaweicloud.com/hce/$releasever/updates/$basearch/
    enabled=1
    gpgcheck=1
    gpgkey=https://repo.huaweicloud.com/hce/$releasever/updates/RPM-GPG-KEY-HCE-2
     
    [debuginfo]
    name=HCE $releasever debuginfo
    baseurl=https://repo.huaweicloud.com/hce/$releasever/debuginfo/$basearch/
    enabled=0
    gpgcheck=1
    gpgkey=https://repo.huaweicloud.com/hce/$releasever/debuginfo/RPM-GPG-KEY-HCE-2

If x2hce-ca is installed on CentOS, replace $releasever with the actual HCE version. For example, the configuration for HCE 2.0 is as follows:

[base]
name=HCE 2.0 base
baseurl=https://repo.huaweicloud.com/hce/2.0/os/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/hce/2.0/os/RPM-GPG-KEY-HCE-2

[updates]
name=HCE 2.0 updates
baseurl=https://repo.huaweicloud.com/hce/2.0/updates/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/hce/2.0/updates/RPM-GPG-KEY-HCE-2
 
[debuginfo]
name=HCE 2.0 debuginfo
baseurl=https://repo.huaweicloud.com/hce/2.0/debuginfo/$basearch/
enabled=0
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/hce/2.0/debuginfo/RPM-GPG-KEY-HCE-2
  1. Install x2hce-ca.
    Run yum install -y x2hce-ca-hce to install x2hce-ca. After the installation is complete, the directories listed in Table 1 will be generated.
    Table 1 Directories generated after x2hce-ca is installed

    Directory

    Description

    /var/log/x2hce-ca

    Stores log files of the x2hce-ca tool.

    /var/log/aparser

    Stores log files of the parser.

    /opt/x2hce-ca/output

    Stores the reports generated by the x2hce-ca tool.

    /opt/x2hce-ca/scan

    Stores the application software packages to be scanned.

    /etc/x2hce-ca/config

    Stores static configuration files.

    /etc/x2hce-ca/database_2.0.0.630

    Stores database files.

    /usr/local/x2hce-ca

    Stores program files.

    /usr/local/x2hce-python-3

    Python installation directory of the tool

  2. To make x2hce-ca take effect, perform operations as prompted after the installation is complete. Figure 1 is an example of the prompt, prompting you to run alias x2hce-ca="x2hce_python39 /usr/local/x2hce-ca/x2hce-ca.pyc" or restart the OS.
    Figure 1 Example prompt after the installation of x2hce-ca-hce