Linux Learning Notes (22) Yum change domestic source, yum download rpm package, source package installation

Source: Internet
Author: User
Tags yum repolist
First, yum change domestic source
First of all

cd /etc/yum.repos.d/rm -f dvd.repo

Delete the previously added local repository and restore the original warehouse back

cp  /etc/yum.repos.d.bak/*  /etc/yum.repos.d/cp  ../yum.repos.d.bak/*   .

The above two commands are all possible, the second one is used under practice: And.
LS View file list, delete Centos-base.repo

rm -rf CentOS-Base.repo


Create a domestic source

wget http://mirrors.163.com/.help/CentOS7-Base-163.repo


Since the wget was not installed, Yum could not be used to install wget because the Yum source was deleted.
You can install a new source with the following command

curl -O http://mirrors.163.com/.help/CentOS7-Base-163.repo`



Yum List

Yum Install zsh

If you change the name of Centos7-base-163.repo, the Yum command will not work.

Execute Yum repolist all
will find that all RPM packages are not available

Linux Learning Notes (22) Yum change domestic source, yum download rpm package, source package installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.