Configure the network yum source (with the download address) in CentOS7 and centos7yum

Source: Internet
Author: User
Tags install perl

Configure the network yum source (included) in CentOS7 and centos7yum
1. Check whether the Internet is smooth

Configure the network yum source (you need to ensure that the Internet is activated. Here I use Netease 163 to provide open-source image sites)

 

Ii. Download the repo File
cd /etc/yum.repos.d
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

  

3. Back up and replace the system's repo File

Back up the original. repo configuration file

cd /etc/yum.repos.dmv CentOS-Base.repo CentOS-Base.repo.bk        

Copy the. repo file downloaded by Netease and modify the file name.

mv CentOS6-Base-163.repo CentOS-Base.repo    

 

4. Execute yum source update

Clear previous cache using yum

yum clean all      

Create a cache to facilitate searching in the cache

yum makecache

  

5. Check the network yum Source

Find the perl installation package from the network yum Source

yum list | grep perl*

 

Install

yum install perl-DBIyum install perl-DBD-MySQLyum install perl-Time-HiResyum install perl-IO-Socket-SSL

  

 

Error:

If the following error is prompted when running yum makecache:

That is, your system does not configure the environment variables $ releasever and $ basearch. You need to change the configuration file $ releasever to 6 or i386.

 

If yum makecache is running normally, the following message is displayed:

 

Related Article

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.