阿里云镜像使用阿里巴巴DNS镜像源——DNS配置教程

【阿里云镜像使用阿里巴巴DNS镜像源——DNS配置教程】春衣少年当酒歌,起舞四顾以笑和。这篇文章主要讲述阿里云镜像使用阿里巴巴DNS镜像源——DNS配置教程相关的知识,希望能为你提供帮助。
@TOC
一、参考链接阿里巴巴开源镜像站:阿里巴巴开源镜像站
DNS安装教程:DNS安装教程
二、DNS简介三、配置方法 Linux 快速配置ipv4编辑文件 " /etc/resolv.conf" ,根据情况修改文件内容。
只需要添加以下两行
nameserver 223.5.5.5
nameserver 223.6.6.6

[root@ecs-kunpeng ~]# vim /etc/resolv.conf [root@ecs-kunpeng ~]# cat /etc/resolv.conf # Generated by NetworkManager search openstacklocal #nameserver 100.125.1.250 #nameserver 100.125.129.250 options timeout:1 single-request-reopen nameserver 223.5.5.5 nameserver 223.6.6.6 [root@ecs-kunpeng ~]#

阿里云镜像使用阿里巴巴DNS镜像源——DNS配置教程

文章图片

Linux 快速配置ipv6编辑文件 " /etc/resolv.conf" ,根据情况修改文件内容。
只需要添加以下两行
nameserver 2400:3200::1
nameserver 2400:3200:baba::1
[root@ecs-kunpeng ~]# vim /etc/resolv.conf [root@ecs-kunpeng ~]# cat /etc/resolv.conf # Generated by NetworkManager search openstacklocal #nameserver 100.125.1.250 #nameserver 100.125.129.250 options timeout:1 single-request-reopen nameserver 223.5.5.5 nameserver 223.6.6.6 nameserver 2400:3200::1 nameserver 2400:3200:baba::1

保存退出,然后使用 dig 验证:
若显示以下错误信息
[root@ecs-kunpeng ~]# dig alidns.com -bash: dig: command not found [root@ecs-kunpeng ~]# [root@ecs-kunpeng ~]# yum provides dig bind-utils-32:9.11.26-4.el8_4.aarch64 : Utilities for querying DNS name servers Repo: AppStream Matched from: Filename: /usr/bin/dig

使用yum源安装bind-utils-32:9.11.26-4.el8_4.aarch64组件
[root@ecs-kunpeng ~]# yum install -y bind-utils-32:9.11.26-4.el8_4.aarch64 CentOS-8 - AppStream44 kB/s | 4.3 kB00:00 CentOS-8 - Base40 kB/s | 3.9 kB00:00 CentOS-8 - Extras15 kB/s | 1.5 kB00:00 Extra Packages for Enterprise Linux Modular 8 - aarch6428 kB/s | 3.0 kB00:00 Extra Packages for Enterprise Linux 8 - aarch6447 kB/s | 4.7 kB00:00 Dependencies resolved. ======================================================================================================================== PackageArchitectureVersionRepositorySize ======================================================================================================================== Installing: bind-utilsaarch6432:9.11.26-4.el8_4AppStream445 k Installing dependencies: bind-libsaarch6432:9.11.26-4.el8_4AppStream169 k bind-libs-liteaarch6432:9.11.26-4.el8_4AppStream1.1 M bind-licensenoarch32:9.11.26-4.el8_4AppStream102 k fstrmaarch640.6.0-3.el8.1AppStream27 k protobuf-caarch641.3.0-6.el8AppStream37 k python3-bindnoarch32:9.11.26-4.el8_4AppStream149 kTransaction Summary ======================================================================================================================== Install7 PackagesTotal download size: 2.0 M Installed size: 5.4 M Downloading Packages: (1/7): bind-license-9.11.26-4.el8_4.noarch.rpm714 kB/s | 102 kB00:00 (2/7): bind-libs-lite-9.11.26-4.el8_4.aarch64.rpm6.7 MB/s | 1.1 MB00:00 (3/7): fstrm-0.6.0-3.el8.1.aarch64.rpm892 kB/s |27 kB00:00 (4/7): bind-utils-9.11.26-4.el8_4.aarch64.rpm7.9 MB/s | 445 kB00:00 (5/7): protobuf-c-1.3.0-6.el8.aarch64.rpm1.2 MB/s |37 kB00:00 (6/7): python3-bind-9.11.26-4.el8_4.noarch.rpm5.0 MB/s | 149 kB00:00 (7/7): bind-libs-9.11.26-4.el8_4.aarch64.rpm714 kB/s | 169 kB00:00 ------------------------------------------------------------------------------------------------------------------------ Total8.3 MB/s | 2.0 MB00:00 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing:1/1 Installing: protobuf-c-1.3.0-6.el8.aarch641/7 Installing: fstrm-0.6.0-3.el8.1.aarch642/7 Installing: bind-license-32:9.11.26-4.el8_4.noarch3/7 Installing: bind-libs-lite-32:9.11.26-4.el8_4.aarch644/7 Installing: bind-libs-32:9.11.26-4.el8_4.aarch645/7 Installing: python3-bind-32:9.11.26-4.el8_4.noarch6/7 Installing: bind-utils-32:9.11.26-4.el8_4.aarch647/7 Running scriptlet: bind-utils-32:9.11.26-4.el8_4.aarch647/7 Verifying: bind-libs-32:9.11.26-4.el8_4.aarch641/7 Verifying: bind-libs-lite-32:9.11.26-4.el8_4.aarch642/7 Verifying: bind-license-32:9.11.26-4.el8_4.noarch3/7 Verifying: bind-utils-32:9.11.26-4.el8_4.aarch644/7 Verifying: fstrm-0.6.0-3.el8.1.aarch645/7 Verifying: protobuf-c-1.3.0-6.el8.aarch646/7 Verifying: python3-bind-32:9.11.26-4.el8_4.noarch7/7Installed: bind-utils-32:9.11.26-4.el8_4.aarch64bind-libs-32:9.11.26-4.el8_4.aarch64 bind-libs-lite-32:9.11.26-4.el8_4.aarch64 bind-license-32:9.11.26-4.el8_4.noarch fstrm-0.6.0-3.el8.1.aarch64protobuf-c-1.3.0-6.el8.aarch64 python3-bind-32:9.11.26-4.el8_4.noarchComplete! [root@ecs-kunpeng ~]#

使用 dig 验证若返回结果的 server 为阿里公共 DNS,则配置成功。
[root@ecs-kunpeng ~]# dig alidns.com; < < > > DiG 9.11.26-RedHat-9.11.26-4.el8_4 < < > > alidns.com ; ; global options: +cmd ; ; Got answer: ; ; -> > HEADER< < - opcode: QUERY, status: NOERROR, id: 57868 ; ; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0; ; QUESTION SECTION: ; alidns.com.INA; ; ANSWER SECTION: alidns.com.120INA203.119.175.226; ; Query time: 12 msec ; ; SERVER: 223.5.5.5#53(223.5.5.5) ; ; WHEN: Fri Dec 03 23:29:35 CST 2021 ; ; MSG SIZErcvd: 44[root@ecs-kunpeng ~]#


    推荐阅读