温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

ubuntu域名服务器地址怎么配置

发布时间:2022-11-28 10:06:13 来源:亿速云 阅读:592 作者:iii 栏目:服务器

本篇内容主要讲解“ubuntu域名服务器地址怎么配置”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“ubuntu域名服务器地址怎么配置”吧!

1.打开终端输入以下命令进行安装配置DNS

sudo apt install bind9


2.修改配置文件“/etc/bind/named.conf.local”,添加正逆解析文件的配置,修改后如下:

//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
//domain->ip
zone "flovem.home" in {
type master;
file "/var/cache/bind/db.flovem.home";
};
//ip->domain
zone "0.168.192.in-addr.arpa" in {
type master;
file "/var/cache/bind/reverse/db.0.168.192";
};

3.根据第2步中的配置,添加相应的正逆向解析文件,例如:

在/var/cache/bind/目录下添加文件db.flovem.home:

//正向解析

$TTL 604800

@ IN SOA flovem.home. root.flovem.home. (

2 ; Serial

604800 ; Refresh

86400 ; Retry

2419200 ; Expire

604000) ; Negative Cache TTL

;

; name servers

@ IN NS ns.flovem.home.

@ IN A 192.168.0.102

;ns records

ns IN A 192.168.0.102

;host records

hangzhou IN A 192.168.0.102


在/var/cache/bind/reverse/目录中添加文件db.0.168.192

//逆向解析

$TTL 604800

@ IN SOA flovem.home. root.flovem.home. (

2 ; Serial Number

604800 ; Refresh

86400 ; Retry

2419200 ; Expire

86400 ); ; Minimum


@ IN NS flovem.home.


66 IN PTR hangzhou.flovem.home.


4.重启ubuntu使其生效即可。

到此,相信大家对“ubuntu域名服务器地址怎么配置”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI