Last update at :2024-06-22,Edit by888u
Today, when I was helping a friend mount a data disk and install the LNMP environment in the Alibaba Cloud ECS server, because screen was needed, it was not installed by default, so I started to install it directly with yum and found that there was no data source, so I prepared everything. Update found that the source was not found either. This problem has also happened before, so Snail prepared to update the yum source again.
First, back up the original image file
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
Here we first back up the original image so that we can restore it in case we make a mistake.
Second, update the source directory corresponding to the download
A – CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
B – CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
Log in to our current server's SSH, and then download the Alibaba Cloud image source.
Third, update generation
yum clean allyum makecache
Install after executing the command.
Then there will be no problems when we execute the yum update -y command. Regarding the update yum source for Debian mitigation, Snail has also shared it before. You can refer to \\"Solving the problem of Debian environment being unable to update the update source and replacing the Alibaba Cloud image\\".
Recommended site searches: registration, domain name registration website, site group server rental, domain name, free mysql space, high defense server, foreign trade space, virtual space host, free US host, 100m virtual host,
发表评论