Professional Documents
Culture Documents
DNS NTP YUM FTP Configuration Rhel6
DNS NTP YUM FTP Configuration Rhel6
If you want a GUI DNS editor, you can also install the following package.
Personally, I find the GUI editor more confusing than using the configuration files
directly.
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
listen-on port 53 { 127.0.0.1; 192.168.56.3; }; ## master dns
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; }; ##IP Range
allow-recursion {
localhost;
};
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone"sam.com" IN {
type master;
file "sam.com";
allow-update { none; };
};
zone "56.168.192.in-addr.arpa" IN {
type master;
file "56.168.192.in-addr.arpa";
allow-update { none; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
===================================================================================
================
add reverse lookup zone in file named.rfc1912.zones --> Note dont add forwar zone
"sam.com"
vi /etc/named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
// and http://www.ietf.org/internet-drafts/draft-ietf-dnsop-default-local-zones-
02.txt
// (c)2007 R W Franks
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "localhost.localdomain" IN {
type master;
file "named.localhost";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "named.localhost";
allow-update { none; };
};
zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN
{
type master;
file "named.loopback";
allow-update { none; };
};
zone "1.0.0.127.in-addr.arpa" IN {
type master;
file "named.loopback";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "named.empty";
allow-update { none; };
};
zone "56.168.192.in-addr.arpa" IN {
type master;
file "56.168.192.in-addr.arpa";
allow-update { none; };
};
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
to check named file is correct or not
named-checkconf /etc/named.conf
===================================================================================
=====
===================================================================================
================
cd /var/named/
$TTL 1D
@ IN SOA dns.sam.com root.dns.sam.com (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS dns
dns IN A 192.168.56.3
rac1-priv IN A 192.168.10.101
rac2-priv IN A 192.168.10.102
rac3-priv IN A 192.168.10.103
racdg1-priv IN A 192.168.10.104
racdg2-priv IN A 192.168.10.105
rac12c1-priv IN A 192.168.10.106
rac12c2-priv IN A 192.168.10.107
rac1 IN A 192.168.56.110
rac2 IN A 192.168.56.111
rac3 IN A 192.168.56.112
racdg1 IN A 192.168.56.113
racdg2 IN A 192.168.56.114
rac12c1 IN A 192.168.56.116
rac12c2 IN A 192.168.56.117
rac1-vip IN A 192.168.56.120
rac2-vip IN A 192.168.56.121
rac3-vip IN A 192.168.56.122
racdg1-vip IN A 192.168.56.123
racdg2-vip IN A 192.168.56.124
rac12c1-vip IN A 192.168.56.125
rac12c2-vip IN A 192.168.56.126
rac-scan IN A 192.168.56.130
rac-scan IN A 192.168.56.131
rac-scan IN A 192.168.56.132
rac-12 IN A 192.168.56.133
rac-12 IN A 192.168.56.134
rac-12 IN A 192.168.56.135
dg11g IN A 192.168.56.10
dg2 IN A 192.168.56.11
dg3 IN A 192.168.56.12
db11g IN A 192.168.56.13
db12c IN A 192.168.56.14
sam IN A 192.168.56.201
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
to check zone configuration is correct or not
===================================================================================
==================
$ORIGIN 56.168.192.in-addr.arpa.
$TTL 1D
@ IN SOA sam.com. root.sam.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS dns.sam.com.
3 IN PTR dns.sam.com.
110 IN PTR rac1.sam.com.
111 IN PTR rac2.sam.com.
112 IN PTR rac3.sam.com.
113 IN PTR racdg1.sam.com.
114 IN PTR racdg2.sam.com.
120 IN PTR rac1-vip.sam.com.
121 IN PTR rac2-vip.sam.com.
122 IN PTR rac3-vip.sam.com.
123 IN PTR racdg1-vip.sam.com.
124 IN PTR racdg2-vip.sam.com.
130 IN PTR rac-scan.sam.com.
131 IN PTR rac-scan.sam.com.
132 IN PTR rac-scan.sam.com.
123 IN PTR racdg1-vip.sam.com.
124 IN PTR racdg2-vip.sam.com.
===================================================================================
=========================
add one more reverse zone fro different network (private IP of RAC)
chkconfig named on
===================================================================================
=====
Now in each client of same domain "sam.com"
"/etc/resolv.conf" File
The DNS server is now running, but each server must be told to use it. This is done
by editing the "/etc/resolv.conf" file on each server,
including the RAC nodes. Make sure the file contains the following entries, where
the IP address and domain match those of your DNS server and the domain you have
configured.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Prevent /sbin/dhclient to update resolv.conf
chattr +i /etc/resolv.conf
to revert back
chattr -i /etc/resolv.conf
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
add DNS in eth0 file
DNS1=192.168.56.3
===================================================================================
=====================
vi /etc/ntp.conf
ntpq -pn
ntptime
===================================================================================
=======================
YUM FTP server config
server is 192.168.56.3
mkdir -p /var/ftp/pub/rhel6/
cd /var/ftp/pub/rhel6/
mount it
mkdir /oracle
ls -ltr |wc -l
vi /etc/yum.repos.d/rhel6.repo
[rhel6_yum]
name=yum_rep
baseurl=file:///var/ftp/pub/rhel6
gpgcheck=0
Install below packagelist
cd /var/ftp/pub/rhel6
createrepo -v /var/ftp/pub/rhel6
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Steps on Client
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Install a Package from Specific Repository
yum --enablerepo=epel install phpmyadmin
---------------------------------------------
to clear cache and install package on client
[root@dns rhel7]# yum whatprovides '*bin/unzip' --> to check which package provide
that command..
------------------------------------------------------------