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: