Create Multiple Domains in one Server-Red Hat Ent. 5

Lets discuss about why we need This type of scenario where we need to install multiple Zone in one
server. Suppose your company decide to open two more sister concerned office (contoso & technews) .
Your company want to keep all those domains in one server. your System Administrator decide to keep
place those two domain under main domain (example.com) & only one reverse lookup for all three
domains.
Or you want to do hosting business for domains,mail server.
First do yum process to install packages. View step by steps
#mkdir /var/ftp
#mkdir /var/ftp/pub
#mount /dev/cdrom /mnt
#cd /mnt
#cp –rf Server /var/ftp/pub
#vi /etc/yum.repos.d/rhel-debuginfo.repo

:wq
Save this
#cd /var/ftp/pub/Server
#rpm –ivh createrepo-0.4.4.2.fc6.noarch.rpm
#cd
#createrepo -v /var/frp/pub/Server
#yum install netconfig*
#netconfig
Set ip address: 192.168.2.100
255.255.255.0
(whatever your ip is ,create reverse lookup zone with that ip)
Now defines Zones as well
#vi /etc/named.rfc1912.zones
go below this line and add like below ——> zone “0.0.0.0.0.00.0.0.0.ip6.arpa”
:wq
save & exit
#cd /var/named/chroot/var/named
now do copy & create file as localhost.zone for-example.com.frw, contoso.com.frw, technews.com.frw,
example.com.rev)
I will edit one by one later——
#cp -rf localhost.zone example.com.frw
#cp -rf localhost.zone contoso.com.frw
#cp -rf contoso.com.frw technews.com.frw
#cp -rf example.com.frw example.com.rev
now edit
#vi example.com.frw

:wq
Save & exit
#vi contoso.com.frw
:wq
Save & exit
#vi technews.com.frw


#vi example.com.rev
: wq
save & exit
#vi /etc/named.caching-nameserver.conf
Here we define an access list from which subnet can access this domain.


:wq
save & exit
#vi /etc/resolf.conf
Add below lines & save
search example.com
search contoso.com
search technews.com
nameserver 192.168.2.100
:wq
save & exit
# iptables -F
#service network restart
#service named restart
#ntsysv
select named as * & exit
restart & check as below
#dig -x 192.168.2.100
In this report you can see ———-> status: NOERROR
#rndc reload
successful….
now check from client computer.Add a win-7 pc
ip add:192.168.2.101 subnet mask:255.255.255.0
add DNS as:192.168.2.100
>ping 192.168.2.100
>ping www.example.com
should be success
>ping contoso.com
should be success
>ping technews.com
should be success

No comments:

Post a Comment