Este conteúdo foi traduzido por máquina para sua conveniência e a Huawei Cloud não pode garantir que o conteúdo foi traduzido com precisão. Para exibir o conteúdo original, use o link no canto superior direito para mudar para a página em inglês.
Central de ajuda/ Elastic Cloud Server/ Perguntas frequentes/ Image Source Management/ How Can I Use an Ubuntu Image Source (x86_64 or Arm) Provided by HUAWEI CLOUD?
Atualizado em 2025-01-23 GMT+08:00

How Can I Use an Ubuntu Image Source (x86_64 or Arm) Provided by HUAWEI CLOUD?

Scenarios

When you are required to update the OS or software of an ECS, you can access the Internet through the ECS and use an external Ubuntu image source. However, if your ECS cannot access the Internet, or the external Ubuntu image source cannot provide services stably, you can use the Ubuntu image source provided by HUAWEI CLOUD.

Constraints

  • Esta seção aplica-se apenas às seguintes regiões: CN North-Beijing1, CN North-Beijing4, CN East-Shanghai1, CN East-Shanghai2, CN South-Guangzhou e CN-Hong Kong.
  • Você configurou o servidor DNS da intranet fornecido pela HUAWEI CLOUD.

    Para obter o endereço do servidor DNS da intranet, consulte Quais são os endereços de servidor DNS privados fornecidos pela Huawei Cloud?

    Para obter instruções sobre como configurar um servidor DNS, consulte Configuração do DNS.

  • The operations described in this section apply to both x86_64 and Arm (Kunpeng) ECSs.

Procedure

  1. Log in to the ECS.
  2. Run the following command to back up the sources.list file:

    mv /etc/apt/sources.list /etc/apt/sources.list.bak

  3. Select a suitable wget command according to the Ubuntu image source version, run the command to download the sources.list file, and save the file into /etc/apt/:

    Tabela 1 lists the mapping between Ubuntu versions and version names.

    Tabela 1 Mapping between Ubuntu versions and version names

    Version

    Version Name

    apt Source Configuration File

    Ubuntu 20.04

    Focal Fossa

    source.list.focal

    Ubuntu 18.04

    Bionic Beaver

    sources.list.bionic

    Ubuntu16.10

    YakketyYak

    sources.list.yakkety

    Ubuntu 16.04 LTS

    Xenial Xerus

    sources.list.xenial

    Ubuntu 14.04 LTS

    Trusty Tahr

    sources.list.trusty

    Ubuntu 12.04 LTS

    Precise Pangolin

    sources.list.precise

    Take Ubuntu 18.04 as an example. Its apt source configuration file is sources.list.bionic. The configurations are as follows:

    • x86_64 architecture

      wget -O /etc/apt/sources.list http://mirrors.myhuaweicloud.com/repo/sources.list.bionic

    • Arm (Kunpeng) architecture

      wget -O /etc/apt/sources.list http://mirrors.myhuaweicloud.com/repo/aarch64/sources.list.bionic

  4. Run the following command to update the software library:

    apt-get update

  • If certain packages are unavailable, this issue may be caused by in-progress data synchronization. In this case, try again after a few hours.