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

Using dnf or yum to Upgrade

Updated on 2024-09-14 GMT+08:00

This section describes how to update or roll back the RPM packages of HCE 1.1 or later. The methods for using dnf and yum are the same. In this section, dnf is used. If you are upgrading to HCE 1.1, use yum.

NOTE:
  • Huawei Cloud EulerOS 2.0 and later support both yum and dnf.
  • Huawei Cloud EulerOS 1.1 supports only yum.

Prerequisites

The dnf component has been installed and the dnf commands are available.

[root@localhost bin]# dnf
usage: dnf [options] COMMAND

List of Main Commands:

alias                     List or create command aliases
autoremove                remove all unneeded packages that were originally installed as dependencies
check                     check for problems in the packagedb
check-update              check for available package upgrades
clean                     remove cached data
deplist                   [deprecated, use repoquery --deplist] List package's dependencies and what packages provide them
distro-sync               synchronize installed packages to the latest available versions
downgrade                 Downgrade a package
......

Context

Yum is a package management utility for Linux distributions, like CentOS. Yum allows for automatic updates and package management on RPM-based distributions. dnf is a rewrite of yum and improves on yum in several ways: improved performance, less memory usage, and better resolution of dependency conflicts. To ensure compatibility, HCE also supports yum commands.

Upgrade Procedure

  1. Check what RPM package updates are available.
    • Run dnf list updates to see the available updates.
      [root@localhost bin]# dnf list updates 
      Last metadata expiration check: 6:49:11 ago on Tue 28 Jun 2022 01:55:35 PM CST.  
      hce-config.x86_64                           3.0-66.hce2                
      hce-latest-release.x86_64                   2.0-1656179342.2.0.2206.B032.hce2 
      irqbalance.x86_64                           3:1.8.0-7.h9.hce2  
      kernel.x86_64                               5.10.0-60.18.0.50.h316_1.hce2
      kernel-tools.x86_64                         5.10.0-60.18.0.50.h316_1.hce2 
      kernel-tools-libs.x86_64                    5.10.0-60.18.0.50.h316_1.hce2
      kexec-tools.x86_64                          2.0.23-4.h8.hce2 
      libcurl.x86_64                              7.79.1-2.h4.hce2 
      libssh.x86_64                               0.9.6-2.h3.hce2 
      libstdc++.x86_64                            10.3.1-10.h10.hce2 
      libxml2.x86_64                              2.9.12-5.h5.hce2  
      openssh.x86_64                              8.8p1-2.h12.hce2 
      openssh-clients.x86_64                      8.8p1-2.h12.hce2 
      openssh-server.x86_64                       8.8p1-2.h12.hce2  
      Obsoleting Packages 
      dnf-data.noarch                             4.10.0-3.h6.hce2      
      dnf.noarch                                  4.10.0-3.h5.hce2  
      dnf-data.noarch                             4.10.0-3.h6.hce2    
      dnf-data.noarch                             4.10.0-3.h5.hce2
    • Run dnf list updates --security to list only the RPM packages related to security updates.
      [root@localhost bin]# dnf list updates --security 
      Last metadata expiration check: 0:00:03 ago on Fri 08 Jul 2022 04:45:56 PM CST. 
      No security updates needed, but 2 updates available
  2. Update the RPM packages.
    • Run dnf update to update all the RPM packages, including those related to security updates for vulnerability fixing. The components' target versions are returned in the Version column.
      [root@localhost bin]# dnf update 
      Last metadata expiration check: 7:12:18 ago on Tue 28 Jun 2022 01:55:35 PM CST. 
      Dependencies resolved. 
      ================================================================================================  
       Package                        Arch      Version                                 Repo     Size ================================================================================================ 
      Installing:  
       kernel                         x86_64    5.10.0-60.18.0.50.h316_1.hce2           hce2     47 M 
      Upgrading:  
       hce-config                     x86_64    3.0-66.hce2                             hce2     13 k 
       hce-latest-release             x86_64    2.0-1656179342.2.0.2206.B032.hce2       hce2    5.2 k 
       kernel-tools                   x86_64    5.10.0-60.18.0.50.h316_1.hce2           hce2    230 k 
       kernel-tools-libs              x86_64    5.10.0-60.18.0.50.h316_1.hce2           hce2     62 k 
       kexec-tools                    x86_64    2.0.23-4.h8.hce2                        hce2    400 k 
       libcurl                        x86_64    7.79.1-2.h4.hce2                        hce2    284 k 
       libssh                         x86_64    0.9.6-2.h3.hce2                         hce2    194 k 
       libstdc++                      x86_64    10.3.1-10.h10.hce2                      hce2    535 k 
       libxml2                        x86_64    2.9.12-5.h5.hce2                        hce2    659 k  
       logrotate                      x86_64    3.18.1-1.h2.hce2                        hce2     60 k 
       mdadm                          x86_64    4.1-5.h2.hce2                           hce2    331 k 
       nftables                       x86_64    1:1.0.0-1.h3.hce2                       hce2    303 k 
       perl                           x86_64    4:5.34.0-3.h5.hce2                      hce2    3.2 M 
       perl-libs                      x86_64    4:5.34.0-3.h5.hce2                      hce2    1.8 M 
      Installing dependencies: 
       grub2-tools-efi                x86_64    1:2.06-3.h5.hce2                        hce2    472 k 
      
       Transaction Summary 
      ================================================================================================ 
      Install   2 Packages 
      Upgrade  72 Packages  
      Total download size: 105 M 
      Is this ok [y/N]:
    • Run dnf update --security to update only the RPM packages related to security updates.
      [root@localhost bin]# dnf update --security 
      Last metadata expiration check: 7:15:16 ago on Tue 28 Jun 2022 01:55:35 PM CST. 
      No security updates needed, but 73 updates available Dependencies resolved. 
      Nothing to do. 
      Complete!
  3. After the update is successful, check that services are running properly.

    The issue that may occur during an update:

    Based on the requirements of security regulations, the chronyd service will be disabled after Huawei Cloud EulerOS is upgraded from 2.0.2206 to a new version. If required, run systemctl enable chronyd to enable the service and run systemctl start chronyd to start the service.

Rollback Procedure

  1. Run dnf history to query the IDs of historical operations.

  2. Run dnf history undo <ID> to roll back to the desired historical operation.

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