在RH AS 3上完全編譯安裝BIND-9.2.3(轉)
在RH AS 3上完全編譯安裝BIND-9.2.3(轉)[@more@]安裝BIND9:# tar zxvf bind-9.2.3.tar.gz# cd bind-9.2.3# ./configure--prefix=/usr/local/named--disable-ipv6# make# make install建立BIND使用者:# groupadd bind# useradd bind -g bind -d /usr/local/named -s /sbin/nologin建立配置檔案目錄:# mkdir –p /usr/local/named/etc# chown bind:bind /usr/local/named/etc# chmod 700 /usr/local/named/etc建立主要的配置檔案:# vi /usr/local/named/etc/named.conf===========================named.conf=======================acl "trust-lan" { 127.0.0.1/8; 192.168.0.0/16;};options {directory "/usr/local/named/etc/";pid-file "/var/run/named/named.pid";version "0.0.0";datasize 40M;allow-transfer {"trust-lan";};recursion yes;allow-notify {"trust-lan";};allow-recursion {"trust-lan";};auth-nxdomain no;forwarders {202.99.160.68;202.99.168.8;};};logging {channel warning{ file "/var/log/named/dns_warnings" versions 3 size 1240k;severity warning;print-category yes;print-severity yes;print-time yes;};channel general_dns{ file "/var/log/named/dns_logs" versions 3 size 1240k;severity info;print-category yes;print-severity yes;print-time yes;};category default { warning; };category queries { general_dns; };};zone "." {type hint;file "named.root";};zone "0.0.127.IN-ADDR.ARPA" {type master;file "localhost";};zone "home.com" {type slave;file "home.com";masters {192.168.0.1;};};zone "0.168.192.in-addr.arpa" {type slave;file "0.168.192.in-addr";masters {192.168.0.1;};};=========================named.conf==========================# vi /usr/local/named/etc/home.com============================ home.com ==========================$TTL 86400$ORIGIN home.com.@ IN SOA redhat.home.com. root.home.com (2001111601 ; serial28800 ; refresh14400 ; retry3600000 ; expire86400 ; default_ttl)IN NS redhat.home.com.;; -- default address -@ IN A 192.168.0.1;; -- FreeBSD SerVer --redhat IN A 192.168.0.1IN MX 0 redhat.home.com.IN MX 10 linux.home.comIN HINFO "redhat as 3.0".IN TXT "The internet gateway".;; --- WIN2K SerVer ---win2k IN A 192.168.0.10IN MX 0 win2k.home.com.IN MX 10 redhat.home.com.IN HINFO "windows 2000 server".;; ------ cnames ------dns IN CNAME redhatwww IN CNAME redhatmail IN CNAME redhatftp IN CNAME redhat============================ home.com ==========================# vi /usr/local/named/etc/0.168.192.in-addr======================== 0.168.192.in-addr =====================$TTL 86400@ IN SOA redhat.home.com. root.home.home.com. (2001111601 ; Serial28800 ; refresh14400 ; retry3600000 ; expire86400 ) ; minimum@ IN NS redhat.home.com.1 IN PTR dns.home.com.1 IN PTR 1 IN PTR mail.home.com.1 IN PTR ftp.home.com.10 IN PTR win2k.home.com.======================== 0.168.192.in-addr ======================# vi /usr/local/named/etc/localhost=========================== localhost ===========================$TTL 3600@ IN SOA redhat.home.com. root.home.home.com. (20040526 ; Serial3600 ; Refresh900 ; Retry3600000 ; Expire3600 ) ; MinimumIN NS redhat.home.com.1 IN PTR localhost.home.com.=========================== localhost ===========================更新根區檔案:# cd /usr/local/named/etc/# wget ftp://ftp.internic.org/domain/named.root建立PID和日誌檔案:# mkdir /var/run/named/# chmod 777 /var/run/named/# chown bind:bind /var/run/named/# mkdir /var/log/named/# touch /var/log/named/dns_warnings# touch /var/log/named/dns_logs# chown bind:bind /var/log/named/*生成rndc-key:# cd /usr/local/named/etc/# ../sbin/rndc-confgen > rndc.conf把rndc.conf中:# Use with the following in named.conf, adjusting the allow list as needed:後面以的部分加到/usr/local/named/etc/named.conf中並去掉註釋執行測試:# /usr/local/named/sbin/named -gc /usr/local/named/etc/named.conf &狀態檢查:# /usr/local/named/sbin/rndc status建立啟動指令碼:# vi /etc/init.d/named============================== named.sh============================#!/bin/bash## named a network name service.### chkconfig: 545 35 75# description: a name server#if [ `id -u` -ne 0 ]thenecho "ERROR:For bind to port 53,must run as root."exit 1ficase "$1" instart)if [ -x /usr/local/named/sbin/named ]; then/usr/local/named/sbin/named -u bind -c /usr/local/named/etc/named.conf && echo . && echo 'BIND9 server started.'fi;;stop)kill `cat /var/run/named/pid` && echo . && echo 'BIND9 server stopped.';;restart)echo .echo "Restart BIND9 server"$0 stopsleep 10$0 start;;*)echo "$0 start | stop | restart";;esac===============================named.sh============================# chmod 755 /etc/init.d/named# chown root:root /etc/init.d/named# chkconfig -add named# chkconfig named o
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8225414/viewspace-945026/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 在solrais下編譯安裝MySQL(轉)SolrAI編譯MySql
- 在RH9下安裝NVIDIA顯示卡(轉)
- RHEL3上安裝Oracle9.2.0 完全版(轉)Oracle
- Linux上安裝GCC編譯器過程(轉)LinuxGC編譯
- 在VMware已安裝的CentOS7.9上編譯安裝mysql5.6CentOS編譯MySql
- 安裝 GCC 編譯器(轉)GC編譯
- 在RedHat EL AS 3上安裝Oracle9.2.0(轉)RedhatOracle
- 使用reiserfs格式安裝RH8(轉)
- 在麒麟V10伺服器上編譯安裝HAProxy伺服器編譯
- STLPort的編譯和安裝 (轉)編譯
- 【轉】MySQL原始碼編譯安裝MySql原始碼編譯
- zabbix分散式監控環境完全編譯安裝部署分散式編譯
- orthanc 編譯安裝mysql S3編譯MySqlS3
- RH4上安裝oracle10g薦Oracle
- 在Ubuntu 18.04上編譯安裝pppoe客戶端軟體Ubuntu編譯客戶端
- 在Linux系統上安裝Java反編譯工具的方法LinuxJava編譯
- RH AS3 上快速實現磁碟配額(轉)S3
- 在Ubuntu上安裝openssh(轉)Ubuntu
- FreeBSD編譯安裝新核心(轉)編譯
- FreeBSD手工編譯安裝程式(轉)編譯
- 在Centos5.2下編譯安裝LAMPCentOS編譯LAMP
- PHP7.0.0在OS X編譯安裝PHP編譯
- 編譯安裝zabbix編譯
- apache編譯安裝Apache編譯
- 編譯安裝nmon編譯
- swoole 編譯安裝編譯
- 編譯安裝Nginx編譯Nginx
- 編譯安裝mysql編譯MySql
- nginx編譯安裝Nginx編譯
- 安裝編譯ffmpeg編譯
- Griffin編譯安裝編譯
- 手把手教你編譯安裝MPlayer(轉)編譯
- ubuntu GNOME下完美編譯安裝EVA(轉)Ubuntu編譯
- CentOS下編譯安裝Python3教程CentOS編譯Python
- centos7編譯安裝python3CentOS編譯Python
- CentOS 7下編譯安裝Python3CentOS編譯Python
- 在樹莓派上編譯安裝golang環境樹莓派編譯Golang
- rh4上 安裝oracle 11g r1Oracle