Last update at :2024-07-11,Edit by888u
Sometimes when we operate a certain software, we need specific support in a certain mirror environment. For example, we need to install a certain DOCKER software today and it needs to be in the CENTOS7 test environment. Because Snail also has several test machines that we usually use, I will just mention one here and check it out, and then we need to check whether the current image is the CENTOS7 version. , here we will record how to detect the CENTOS version.
First, how to check the CentOS image version
When we choose a method, we only need one of them. If we choose according to our actual needs, our current system image version can be detected.
1. uname -a
We can see this through this command:
Linux VM_0_6_centos 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
We used to need to check whether a certain version supports this when installing acceleration software. This is a visible version, but it's not the one we need. We only see version 7.x.
2. cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
We are very clear about this, seeing that it is version 7.5. From now on we will use this to check the CENTOS version.
Second, if you change the mirror source in mainland China
If we use mainland China cloud servers, they are basically mirror sources from mainland China. If we use foreign mirrors, there must be a slight problem. Foreign sources open very slowly, so sometimes we install The software is more troublesome, so Snail generally recommends changing it directly to the source of Alibaba Cloud or 163 in mainland China. I have recorded many such articles on the website, but how to change it for CENTOS7?
1. Backup image
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
We need to back up the existing image first.
2. Alibaba Cloud Mirror
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
We download the Alibaba Cloud image.
3. Add EPEL
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
4. Update
yum clean allyum makecache -y #Generate cache yum update -y
Finally, we update the system and then go through the system again. If there are no errors, it means there is no problem.
Recommended site search: free server website, Hong Kong server defense, how to rent a server, foreign PHP host, registration-free virtual space, website registration domain name query, Hong Kong high-defense server, IP proxy address US server website, special price space, < /p>
发表评论