[root@localhost ~]#
mount /dev/cdrom /mnt 挂载光盘
[root@localhost ~]#
vim /etc/yum.repos.d/rhel-debuginfo.repo 编辑yum
[rhel-debuginfo.repo]
name=Red Hat
baseurl=file:///mnt/Server
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
~
[root@localhost ~]#
yum install -y bind 安装bind包
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
rhel-debuginfo.repo
| 1.3 kB 00:00
primary.xml.gz
| 716 kB 00:00
rhel-debuginfo.repo
2255/2255
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package bind.i386 30:9.3.4-10.P1.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package
Arch Version Repository Size
================================================================================
Installing:
bind
i386 30:9.3.4-10.P1.el5 rhel-debuginfo.repo 953 k
Transaction Summary
================================================================================
Install
1 Package(s)
Update
0 Package(s)
Remove
0 Package(s)
Total download size: 953 k
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing
: bind [1/1]
Installed: bind.i386 30:9.3.4-10.P1.el5
Complete!
[root@localhost ~]#
rpm -ivh /mnt/Server/bind-chroot-9.3.4-10.P1.el5.i386.rpm
安装chroot包
warning: /mnt/Server/bind-chroot-9.3.4-10.P1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...
########################################### [100%]
1:bind-chroot ########################################### [100%]
按需求更改下面的图片上的资料
192.168.1.87代表本地ip
测试:
如果服务启动而不能测试的话,将/etc/resolv.conf的内容清空保持该文件内的内容为空
[root@localhost named]# vim /etc/resolv.conf
[root@localhost etc]# service named start
启动 named:[确定]
[root@localhost etc]# service named restart
停止 named:[确定]
启动 named:[确定]
[root@localhost etc]# host www.gong.com
www.gong.com has address 192.168.1.87
[root@localhost etc]# host 192.168.1.87
87.1.168.192.in-addr.arpa domain name pointer www.gong.com.