網域名稱:
www.test.com ip
:192.168.0.90
假設機器在沒有安裝dns
的情況下配置的。
在rhel4
上配置dns
步驟如下:
2、 放到乙個共同目錄下:
#tar xfz bind-9.3.1rc1.tar.gz
#cd bind-9.3.0rc4
#./configure --prefix=/usr/local/named
#make
#make install
安裝完成。
3、 進入/usr/local/named/目錄
#mkdir etc
4、 進入/usr/local/named/etc目錄
vi named.conf 內容如下
options ;
zone "." {
type hint;
file "named.root";
zone "localhost" {
type master;
file "localhost.zone";
zone "0.0.127.in-addr.arpa" {
type master;
file "named.127.0.0";
zone "test.com" {
type master;
file "test.zone";
zone "0.168.192.in-addr.arpa" {
type master;
file "named.192.168.0";
5、 增加使用者useradd named
增加目錄 group –g named –g named
增加目錄mkdir /var/named
chown named /var/named
chgrp named /var/named
進到目錄/var/named
6、 vi localhost.zone 內容如下:
[root@dongying named]# more localhost.zone
$ttl 86400
$origin localhost.
@ 1d in soa localhost. root.localhost. (
42 ; serial (d. adams)
3h ; refresh
15m ; retry
1w ; expiry
1d ) ; minimum
@ in ns localhost.
localhost. in a 127.0.0.1
[root@dongying named]#
7、 vi named.127.0.0 內容如下:
[root@dongying named]# more named.127.0.0
$ttl 86400
@ 1d in soa localhost. root.localhost. (
2005092301 ; serial (d. adams)
28800 ; refresh
14400 ; retry
720000 ; expiry
86400 ) ; minimum
@ in ns localhost.
1 in ptr localhost.
[root@dongying named]#
8、 vi named.192.168.0 內容如下:
[root@dongying named]# more named.192.168.0
$ttl 86400
@ in soa dns.test.com. root.dns.test.com. (
86400 )
@ in ns dns.test.com.
90 in ptr www.test.com.
[root@dongying named]#
9、 [root@dongying named]#dig > named.root 直接成生named.root
檔案 內容如下:
; <<>> dig 9.2.4 <<>>
;; global options: printcmd
;; got answer:
;; ->>header<<- opcode: query, status: noerror, id: 20542
;; flags: qr rd ra; query: 1, answer: 13, authority: 0, additional: 13
;; question section:
;. in ns
;; answer section:
. 16945 in ns m.root-servers.net.
. 16945 in ns a.root-servers.net.
. 16945 in ns b.root-servers.net.
. 16945 in ns c.root-servers.net.
. 16945 in ns d.root-servers.net.
. 16945 in ns e.root-servers.net.
. 16945 in ns f.root-servers.net.
. 16945 in ns g.root-servers.net.
. 16945 in ns h.root-servers.net.
. 16945 in ns i.root-servers.net.
. 16945 in ns j.root-servers.net.
. 16945 in ns k.root-servers.net.
. 16945 in ns l.root-servers.net.
;; additional section:
a.root-servers.net. 534156 in a 198.41.0.4
b.root-servers.net. 534286 in a 192.228.79.201
c.root-servers.net. 532457 in a 192.33.4.12
d.root-servers.net. 532458 in a 128.8.10.90
e.root-servers.net. 534157 in a 192.203.230.10
f.root-servers.net. 532457 in a 192.5.5.241
g.root-servers.net. 534246 in a 192.112.36.4
h.root-servers.net. 534207 in a 128.63.2.53
i.root-servers.net. 532458 in a 192.36.148.17
j.root-servers.net. 599763 in a 192.58.128.30
k.root-servers.net. 532457 in a 193.0.14.129
l.root-servers.net. 532457 in a 198.32.64.12
m.root-servers.net. 532457 in a 202.12.27.33
;; query time: 184 msec
;; server: 192.168.0.1#53(192.168.0.1)
;; when: thu sep 22 17:54:13 2005
;; msg size rcvd: 436
10、 vi test.zone 檔案內容如下:
[root@dongying named]# more test.zone
$ttl 86400
@ in soa dns.test.com. root.dns.test.com. (
86400 )
@ in ns dns.test.com.
@ in mx 5 dns.test.com.
dns in a 192.168.0.90
www in a 192.168.0.90
[root@dongying named]#
11、vi /etc/resolv.conf
把這句nameserver 192.168.0.90寫到第一行。
12、 測試:
[root@dongying named]# host 192.168.0.90
90.0.168.192.in-addr.arpa domain name pointer www.test.com.
[root@dongying named]#
[root@dongying named]# host www.test.com
www.test.com has address 192.168.0.90
[root@dongying named]#
這樣就行了。
13、 其它機器訪問,把dns
設為192.168.0.90
就行了,如果不行,重啟或等一會。
執行cmd
nslookup 回車
192.168.0.90 回車
www.test.com 回車
一般能看到正常結果。
RHEL4上安裝使用tripwire
root dg1 cat etc redhat release red hat enterprise linux as release 4 nahant update 6 root dg1 tar jxvf tripwire 2.4.1.2 x86 bin.tar.bz2 root dg1 cd t...
在 rhel5 上配置 SVN
首先需要建立乙個版本庫存放的目錄,如 mkdir var svnroot 之後需要使用 svnadmin 命令來建立乙個版本庫,如 svnadmin create var svnroot test svnadmin 和 svnlook 都是伺服器端的工具,他們可以直接操作版本庫伺服器上的目錄和檔案,...
RHEL4安裝gcc解決無編譯環境的苦惱
rhel4.0最小化安裝後沒有安裝gcc?沒有編譯環境軟體裝不上?很痛苦?安裝步驟如下!先找到如下安裝包.glibc kernheaders 2.4 9.1.87.i386.rpm 第三張盤 glibc headers 2.3.4 2.i386.rpm 第三張盤 glibc devel 2.3.4 ...