BIND 9快速安裝例項(轉)
BIND 9快速安裝例項(轉)[@more@]這是一個伺服器安裝的一部分;由於論壇吃空格,準備了txt檔案在這裡: [code:1:3f69c81bf9]######################## BIND 9 ################ 簡單的bind 9 安裝# 配置為 轉發 + master ###阿土 Aborigen Yin 2003.06.27###################### modules bind 9 #############337.安裝bind 9.2.27.1.獲得原始碼並安裝mkdir -p /usr/local/src/distfilescd /usr/local/src/distfiles#wget ftp://ftp.isc.org/isc/bind9/9.2.2/bind-9.2.2.tar.gzwget ftp://172.16.100.245/pub/distfiles/bind-9.2.2.tar.gztar xfz bind-9.2.2.tar.gz -C ..cd ../bind-9.2.2/./configure --prefix=/usr/local/modules/named --disable-ipv6make && make install7.2.add user and group for namedpw groupadd namedmkdir -p /usr/local/modules/named/etcmkdir -p /usr/local/modules/named/var/logmkdir -p /usr/local/modules/named/var/runpw useradd named -g named -d /usr/local/modules/named -s /sbin/nologinchown -R named:named /usr/local/modules/namedchmod 700 /usr/local/modules/namedchmod 777 /usr/local/modules/named/var/run7.3.配置DNS伺服器cd /usr/local/modules/named/etc#vi named.conf//begin of named.confacl "trust-lan" { 127.0.0.1/8; 192.168.0.0/16; 172.16.0.0/16; };options {directory "/usr/local/modules/named/etc";datasize 80M; allow-transfer {"trust-lan";};forward first;forwarders {202.96.134.133;202.96.128.110;};//recursion no; recursion yes; allow-notify {"trust-lan";};allow-recursion {"trust-lan";};//auth-nxdomain yes; auth-nxdomain no; #不報告自己的版本號version "[secured]"; };// How to log logging { channel warning { file "/usr/local/modules/named/var/log/dns_warnings" versions 3 size 10240k; severity warning; print-category yes; print-severity yes; print-time yes; }; channel general_dns { file "/usr/local/modules/named/var/log/dns_logs" versions 3 size 10240k; 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.rev";};zone "oss4e.org"{type master;file "zone.oss4e.org";notify yes;};zone "100.16.172.in-addr.arpa" {type master;file "zone.100.16.172.in-addr.arpa";};//end of named.conftouch /usr/local/modules/named/var/log/dns_warningstouch /usr/local/modules/named/var/log/dns_logs#獲得根提示檔案wget ftp://ftp.internic.org/domain/named.root#vi named.root; This file holds the information on root name servers needed to; initialize cache of Internet domain name servers; (e.g. reference this file in the "cache . "; configuration file of BIND domain name servers).;; This file is made available by InterNIC ; under anonymous FTP as; file /domain/named.root; on server FTP.INTERNIC.NET;; last update: Nov 5, 2002; related version of root zone: 2002110501;;; formerly NS.INTERNIC.NET;. 3600000 IN NS A.ROOT-SERVERS.NET.A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4;; formerly NS1.ISI.EDU;. 3600000 NS B.ROOT-SERVERS.NET.B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107;; formerly C.PSI.NET;. 3600000 NS C.ROOT-SERVERS.NET.C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12;; formerly TERP.UMD.EDU;. 3600000 NS D.ROOT-SERVERS.NET.D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90;; formerly NS.NASA.GOV;. 3600000 NS E.ROOT-SERVERS.NET.E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10;; formerly NS.ISC.ORG;. 3600000 NS F.ROOT-SERVERS.NET.F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241;; formerly NS.NIC.DDN.MIL;. 3600000 NS G.ROOT-SERVERS.NET.G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4;; formerly AOS.ARL.ARMY.MIL;. 3600000 NS H.ROOT-SERVERS.NET.H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53;; formerly NIC.NORDU.NET;. 3600000 NS I.ROOT-SERVERS.NET.I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17;; operated by VeriSign, Inc. ;. 3600000 NS J.ROOT-SERVERS.NET.J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30;; housed in LINX, operated by RIPE NCC;. 3600000 NS K.ROOT-SERVERS.NET.K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129 ;; operated by IANA;. 3600000 NS L.ROOT-SERVERS.NET.L.ROOT-SERVERS.NET. 3600000 A 198.32.64.12;; housed in Japan, operated by WIDE;. 3600000 NS M.ROOT-SERVERS.NET.M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33; End of File;vi zone.oss4e.org;begin of zone.oss4e.org$TTL 3600@ IN SOA dns1.oss4e.org. webmaster.oss4e.org. (12061702 ; Serial (date, 2 digits version of day)86400 ; refresh (1 day)7200 ; retry (2 hours)864000 ; expire (10 days)86400 ) ; minimum (1 day)IN NS dns1.oss4e.org.IN NS dns2.oss4e.org.IN NS dns.oss4e.org.IN MX 10 mail.oss4e.org.oss4e.org. IN A 172.16.100.243dns IN A 172.16.100.243dns1 IN A 172.16.100.243dns2 IN A 172.16.100.243mail IN A 172.16.100.243smtp IN CNAME mail.oss4e.org.;泛域名解析* IN A 172.16.100.243;end of zone.oss4e.org;vi localhost.rev;begin of localhost.rev$TTL 3600@ IN SOA dns1.oss4e.org. webmaster.oss4e.org. ( 12061702 ; Serial (date, 2 digits version of day)86400 ; refresh (1 day)7200 ; retry (2 hours)864000 ; expire (10 days)86400 ) ; minimum (1 day)IN NS dns1.oss4e.org.IN NS dns2.oss4e.org. IN NS dns.oss4e.org.IN MX 10 mail.oss4e.org.1 IN PTR localhost.oss4e.org.;end of localhost.rev;vi zone.100.16.172.in-addr.arpa;zone.100.16.172.in-addr.arpa$TTL 3600@ IN SOA dns1.oss4e.org. webmaster.oss4e.org. ( 12061702 ; Serial (date, 2 digits version of day)86400 ; refresh (1 day)7200 ; retry (2 hours)864000 ; expire (10 days)86400 ) ; minimum (1 day)IN NS dns1.oss4e.org.IN NS dns2.oss4e.org. IN NS dns.oss4e.org.IN MX 10 mail.oss4e.org.243 IN PTR mail.oss4e.org.;end of zone.100.16.172.in-addr.arpa7.4.配置環境#vi /etc/resolv.confdomain oss4e.orgnameserver 127.0.0.1nameserver 202.96.134.133nameserver 202.96.128.1107.5.#配置日誌:#vi /etc/syslog.conf#新增local.none到messages的末尾,阻止named傳送日誌到messages;# Don't log private authentication messages!*.info;mail.none;authpriv.none;cron.none;local.none /var/log/messages#新增如下,其中!named表示named這個程式發來的日誌;!named*.* /usr/local/modules/named/var/log/named.log#這個是syslog.conf中要求的;touch /usr/local/modules/named/var/log/named.logchown named:named /usr/local/modules/named/var/log/named.logchmod 766 /usr/local/modules/named/var/log/named.logkillall -HUP syslogd7.6.配置啟動檔案#vi /usr/local/modules/named/bin/named-mgr.sh#!/bin/shif [ `id -u` -ne 0 ]thenecho "ERROR:For bind to port 53,must run as root."exit 1ficase "$1" instart)if [ -x /usr/local/modules/named/sbin/named ]; then/usr/local/modules/named/sbin/named -u named && echo . && echo 'BIND9 server started.'fi;;stop)kill `cat /usr/local/modules/named/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#end of named-mgr.shchmod 755 /usr/local/modules/named/bin/named-mgr.shln -s /usr/local/modules/named/bin/named-mgr.sh /usr/local/sbinln -s /usr/local/modules/named/bin/named-mgr.sh /usr/local/etc/rc.d7.7.配置許可權rm -rf /usr/local/modules/named/.*chown -R named:named /usr/local/modules/named/*chmod -R 700 /usr/local/modules/named/*#end of bind9[/code:1:3f69c81bf9][code:1:3f69c81bf9][/code:1:3f69c81bf9
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8225414/viewspace-945022/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Qmail+LDAP安裝配置例項(一)(轉)AILDA
- RedHat7.0下Oracle 8.1.6安裝例項(轉)RedhatOracle
- 5.6單例項安裝單例
- Redis單例項安裝Redis單例
- 在FreeBSD中安裝雙網路卡例項(轉)
- Memcached安裝與使用例項
- mysql 5.7單例項安裝MySql單例
- Grub安裝、配置以及使用例項彙總講解(轉)
- oracle例項安裝到 4% 不能繼續安裝Oracle
- Linux下安裝 Docker例項LinuxDocker
- 【Oracle】ASM例項安裝入門OracleASM
- oracle單例項12.2.0.1安裝Oracle單例
- 安裝Mongodb3.0.6單例項MongoDB單例
- Redhat Linux 9+Oracle 9.2 快速安裝RedhatLinuxOracle
- 9i RAC轉換為SINGLE例項
- 快速進行安裝工作(轉)
- 快速解除安裝 Windows 98(轉)Windows
- jquery bind()名稱空間程式碼例項jQuery
- oracle 11g 單例項安裝Oracle單例
- oracle 多個例項安裝監聽Oracle
- 清除安裝失敗的asm例項ASM
- BIND9詳解之日誌篇(轉)
- db2 安裝後建立例項錯誤!高手指教(轉)DB2
- Linux平臺Oracle 11g單例項 安裝部署配置快速參考LinuxOracle單例
- 在HACMP環境下裝單例項9IACM單例
- DNS解析服務(bind)安裝DNS
- 安裝bind-9.6.0-P1
- 在RH AS 3上完全編譯安裝BIND-9.2.3(轉)編譯
- mysqld_multi安裝多個mysql例項MySql
- 單機環境安裝配置ASM例項ASM
- Oracle8.1.6i+ Apache1.3.14+PHP4.0.3完全安裝例項(轉)OracleApachePHP
- Android應用例項之----基於BroadCastReceiver的SD卡裝載解除安裝例項!AndroidASTSD卡
- GNU make安裝注意事項(轉)
- Linux伺服器—安裝bindLinux伺服器
- Linux伺服器---安裝bindLinux伺服器
- 【安裝】AIX安裝單例項11gR2 GRID+DBAI單例
- Argo 安裝和 workflow 例項配置檔案解析Go
- 19C 單例項資料庫安裝單例資料庫