|
Recently, many friends have been asking why centos7 cannot download environment. Here I will explain to you,
centos7 has ended its lifecycle on June 30th, 2024, and the official no longer provides support and maintenance for maintenance, if you use the official yum source to download environment services, it will report 404.
This article provides available yum sources and configuration tutorials, which are very simple. After connecting to the server via SSH, according to the tutorial steps executed successfully.
1. Backup current Yum source Before switching to a new Yum source, it is recommended to backup the current Yum source configuration file in advance. Execute the following command:
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
This will back up the current Yum source configuration file as CentOS-Base.repo.bak.
2. Download new Yum source configuration file
ol>wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
[/ol]
Here we download the CentOS7 yum source from Aliyun Mirror.
3. Clear Yum cache
ol>yum clean all
4. Generate new cache
ol>yum makecache
The tutorial ends here. Now you can execute yum commands to test whether it can normally download environment. |
|