All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term

Documentation

CentOS yum source configuration

Last updated:2021-08-03 18:56:33

Shift Kingsoft Cloud yum source to the system-provided source

  1. Enter the directory of the yum source configuration file.

    cd  /etc/yum.repos.d/
    ls

  2. Back up the yum source configuration file of Kingsoft Cloud.

    mv CentOS.repo CentOS_repo
  3. Copy the system-provided yum source file to the current directory.

    cp backup/CentOS-Base.repo .          
    ls

  4. Update the system.
    yum update

Shift the system-provided source to Kingsoft Cloud yum source

  1. Enter the directory of the yum source configuration file.
    cd  /etc/yum.repos.d/
    ls
  2. Delete the system-provided yum source configuration file and use the file provided by Kingsoft Cloud.

    rm -f CentOS-Base.repo
    mv CentOS_repo CentOS.repo

  3. Update the system.
    yum update

Change the Linux yum source

  1. Enter the directory of the yum source configuration file.
    cd /etc/yum.repos.d/
  2. Back up the current yum source configuration file.
    mv CentOS-Base.repo CentOS-Base_repo_bak
  3. Download the new configuration file. The following uses the yum source provided by NetEase as an example.
    wget [http://mirrors.163.com/.help/CentOS6-Base-163.repo](http://mirrors.163.com/.help/CentOS6-Base-163.repo)
  4. Rename the configuration file according to the file requirement. The following uses “CentOS6-Base-163.repo” as an example.

    mv CentOS6-Base-163.repo CentOS-Base.repo
  5. Update the system.
    yum update
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen
Feedback