Redhat9上配置DNS(轉)
Redhat9上配置DNS(轉)[@more@]前提:機器名為bak.5ilinux.com 域名為5ilinux.com
1。從安裝盤安裝
rpm -ivh bind-9.2.2-21.i386.rpm
2。增加配置檔案
vi /etc/named.conf
## named.conf - configuration for bind
# # Generated automatically by redhat-config-bind, alchemist et al.
# Any changes not supported by redhat-config-bind should be put
# in /etc/named.custom
# controls { inet 127.0.0.1 allow { localhost; } keys { rndckey; }; }; include "/etc/rndc.key";
options {
directory "/var/named/";
};
zone "." {
type hint;
file "named.ca";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "0.0.127.in-addr.arpa.zone";
};
zone "localhost" {
type master;
file "localhost.zone";
};
zone "5ilinux.com" {
type master;
file "5ilinux.com.zone";
};
下載named.ca
wget
下載後改名為named.ca 存在/var/named目錄下
vi /var/named/localhost.zone
$TTL 86400 @ IN SOA @ root.localhost (
1 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
IN NS localhost.
@ IN A 127.0.0.1
vi /var/named/0.0.127.in-addr.arpa.zone
$TTL 86400 @ IN SOA localhost. root.localhost (
2 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
@ IN NS localhost.
1 IN PTR localhost.
1 IN PTR bak.
vi /var/named/5ilinux.com.zone
$TTL 86400 @ IN SOA bak.wapya.com. root.localhost (
3 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
IN NS bak.wapya.com.
www IN A 210.51.0.124
bak IN A 210.51.0.124
mail IN CNAME www
wap IN A 210.51.0.122
5ilinux.com IN MX 10 www
ok了,就是這些配置檔案,至於原理我就不講了。
只是為了方便以後查資料,所以把配置過程寫下來
/etc/rc.d/iinit.d/named restart
重啟一下服務就可以用了。
1。從安裝盤安裝
rpm -ivh bind-9.2.2-21.i386.rpm
2。增加配置檔案
vi /etc/named.conf
## named.conf - configuration for bind
# # Generated automatically by redhat-config-bind, alchemist et al.
# Any changes not supported by redhat-config-bind should be put
# in /etc/named.custom
# controls { inet 127.0.0.1 allow { localhost; } keys { rndckey; }; }; include "/etc/rndc.key";
options {
directory "/var/named/";
};
zone "." {
type hint;
file "named.ca";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "0.0.127.in-addr.arpa.zone";
};
zone "localhost" {
type master;
file "localhost.zone";
};
zone "5ilinux.com" {
type master;
file "5ilinux.com.zone";
};
下載named.ca
wget
下載後改名為named.ca 存在/var/named目錄下
vi /var/named/localhost.zone
$TTL 86400 @ IN SOA @ root.localhost (
1 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
IN NS localhost.
@ IN A 127.0.0.1
vi /var/named/0.0.127.in-addr.arpa.zone
$TTL 86400 @ IN SOA localhost. root.localhost (
2 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
@ IN NS localhost.
1 IN PTR localhost.
1 IN PTR bak.
vi /var/named/5ilinux.com.zone
$TTL 86400 @ IN SOA bak.wapya.com. root.localhost (
3 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
IN NS bak.wapya.com.
www IN A 210.51.0.124
bak IN A 210.51.0.124
mail IN CNAME www
wap IN A 210.51.0.122
5ilinux.com IN MX 10 www
ok了,就是這些配置檔案,至於原理我就不講了。
只是為了方便以後查資料,所以把配置過程寫下來
/etc/rc.d/iinit.d/named restart
重啟一下服務就可以用了。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10617542/viewspace-960172/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 電腦dns配置錯誤無法上網怎麼辦 dns配置錯誤不能上網DNS
- dns配置錯誤網頁打不開 電腦dns配置錯誤無法上網怎麼辦DNS網頁
- 如何使用 systemd-resolved 在 Fedora 上配置 DNS over TLSDNSTLS
- 在國產處理器伺服器上配置DNS 輪詢伺服器DNS
- 配置Ubuntu DNS伺服器UbuntuDNS伺服器
- ubuntu 配置靜態IP 和 DNSUbuntuDNS
- Linux 中檢視 DNS 與 配置LinuxDNS
- 轉:DNS解析過程詳解DNS
- 雙AdguardHome配置做DNS伺服器DNS伺服器
- Centos 6 DNS 配置 解決 Unknown hostCentOSDNS
- DNS域名解析服務及其配置DNS
- PowerDNS 配置 DNS 名稱伺服器DNS伺服器
- 阿里雲映象站DNS——Chrome配置方法阿里DNSChrome
- Linux---DNS域名解析如何配置LinuxDNS
- dns異常怎麼修復 dns配置異常怎麼處理DNS
- Centos上配置兩層nginx轉發,把請求轉發到外網CentOSNginx
- Centos7系統配置DNS服務CentOSDNS
- eNSP防火牆web介面裡的DNS配置防火牆WebDNS
- DNS主從伺服器配置實現DNS伺服器
- ubuntu16.04 伺服器配置IP DNSUbuntu伺服器DNS
- 【中科三方】高防DNS有效防劫持,配置智慧DNS解析必不可少DNS
- DNS之BIND使用小結(Forward轉發)DNSForward
- RHEL8&CentOS8配置IP地址和DNSCentOSDNS
- docker快速部署DNS,實現快速上線DockerDNS
- Centos8 編輯本地DNS解析配置檔案CentOSDNS
- 轉【翻譯】怎樣在Ubuntu 12.04上配置Apache SSL證書UbuntuApache
- 使用Dnsmasq搭建本地dns伺服器上網DNS伺服器
- 免費試用公安部同配置域名產品:雲解析DNS、SSL證書、IPv6轉換DNS
- webstorm配置scss/less轉wxss,小程式配置scss轉wxssWebORMCSS
- 路由器dns異常怎麼修復 路由器正常上網dns異常路由器DNS
- 【轉!】skywalking告警配置
- nginx配置轉發Nginx
- DNS劫持 DNS汙染 介紹、dns 劫持 汙染DNS
- 使用unbound在RHEL7上搭建DNS服務DNS
- DNS劫持和DNS汙染DNS
- k8s叢集配置使用coredns代替kube-dnsK8SDNS
- Docker系列教程17-預設bridge網路中配置DNSDockerDNS
- flume線上配置
- dns汙染與dns劫持,瞭解dns汙染與dns劫持,網站安全不可疏忽DNS網站