Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Huawei Cloud EulerOS/ User Guide/ Configuring the Repositories and Installing Software for HCE

Configuring the Repositories and Installing Software for HCE

Updated on 2025-01-02 GMT+08:00

HCE uses RPM packages to manage software and provides the official repository matching the OS to release software packages and update packages. You can run the dnf/yum commands for common software management functions, such as installation, upgrade, and uninstallation.

Configuring the Official Repository

By default, the official repository is configured in the /etc/yum.repos.d/hce.repo file of the default HCE image purchased together with the ECS. Take HCE 2.0 as an example. The file content 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

The fields are described as follows:

  • name: name of the repository.
  • baseurl: address of the server where the software repository is located. The value can be in the format of http://, ftp://, or file://.
  • enabled: whether to enable the software repository. The value 1 indicates that the software repository is enabled, and the value 0 indicates that the software repository is disabled.
  • gpgcheck: whether to perform GNU Privacy Guard (GPG) verification. The value 1 indicates that GPG verification is enabled, and the value 0 indicates that GPG verification is disabled.
  • gpgkey: address for storing the public key that is used for GPG verification.
CAUTION:

Modifying this file may affect the software installation and upgrade of the OS. You are advised not to modify this file.

Configuring a Third-Party Repository

To add a third-party repository, perform the following steps (the image source from the OpenEuler community is used as an example):

  1. Add the openEuler.repo file to the /etc/yum.repos.d/ directory. The file name can be customized, but the file name extension must be .repo. Run the vim /etc/yum.repos.d/openEuler.repo command to edit the file.
  2. Set the repository name, for example, [openEuler]. The repository name must be unique and can be changed based on site requirements.
  3. Configure the name field. For example, set it to openEuler repository, which is the detailed description of the repository. You can change the description based on site requirements.
  4. Set baseurl to https://repo.openeuler.org/openEuler-22.03-LTS/OS/x86_64/, which is the link where the software package is obtained. For details, see the product documentation of OpenEuler or the repo provider.
  5. Configure the gpgcheck field. The value 1 indicates that GPG verification is performed on the installed software package.
  6. Configure the enabled field. The value 1 indicates that the repository is enabled.
  7. Set gpgkey to https://repo.openeuler.org/openEuler-22.03-LTS/OS/x86_64/RPM-GPG-KEY-openEuler, which is the link where the public key used for GPG verification is obtained.
The final openEuler.repo file is as follows:
[openEuler]
name=openEuler repository
baseurl=https://repo.openeuler.org/openEuler-22.03-LTS/OS/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://repo.openeuler.org/openEuler-22.03-LTS/OS/x86_64/RPM-GPG-KEY-openEuler
NOTICE:

You can set the priority field to specify the priority of each repository. If the HCE official source is preferentially used, add priority=1 to the hce.repo configuration (a smaller value indicates a higher priority), and then add priority=2 to the third-party source configuration. You can adjust the value based on site requirements. For details about the complete openEuler repository configuration, see Obtaining the openEuler Extended Software Packages.

NOTE:

To upgrade the software package, refer to Upgrading Huawei Cloud EulerOS and RPM Packages.

Common yum and dnf Commands

In HCE 1.1, you can only perform software management operations by running the yum commands. In HCE 2.0, both the yum and dnf commands are supported. The following are common commands for software management.

Function

yum Command

dnf Command

Example Command

Installing software packages

yum install <Software package>

dnf install <Software package>

yum install gcc: installs GCC.

Uninstalling software packages

yum remove <Software package>

dnf remove <Software package>

yum remove gcc: uninstalls GCC.

Listing installed software packages

yum list installed

dnf list installed

yum list installed: lists all software packages in the system.

Searching for software packages

yum search <Software package>

dnf search <Software package>

yum search gcc: searches for the GCC package in the repository.

Querying information about software packages

yum info <Software package>

dnf info <Software package>

yum info gcc: queries GCC software package information.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback