Page 126 - RHEL8 BOOK
P. 126
DNS Server
1. To Set The hostname temporarily
[root@Sun ~]# hostname sun.iiht.com
2. Set The hostname permanently
[root@Sun ~]# hostnamectl set-hostname sun.iiht.com
[root@Sun ~]# vi /etc/hostname
sun.iiht.com
3. To view The hostname
[root@Sun ~]# hostname
3. Set hostname permanently
[root@Sun ~]# vi /etc/sysconfig/network
4. For Graphical avoiding the hostname change in below file
[root@Sun ~]# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost localhost.localdomain
192.168.10.1 sun sun.idesign.com
5. To view the ip address eth0
[root@Sun ~]# ifconfig enp0s3
6. DNS ip address file location
[root@Sun ~]# vi /etc/resolv.conf
nameserver 192.168.10.1
7. check and Installed the packages in RHEL7.
[root@sun ~]# rpm -qa bind*
7. Install the packages in RHEL7.
[root@sun ~]# rpm –ivh bind* --force
Or
[root@sun ~]# yum install bind* -y
8. Edit Main Configuration File1 (RHEL7)
[root@sun ~]# vi /etc/named.conf
11 listen-on port 53 { 127.0.0.1; 192.168.10.1; }; or { any; };
17 allow-query { localhost; 192.168.10.0/24; }; or{ any; };
S. Pradhan
(MCA, MBA-IT, BCA, CCNA, MCSA 2012, RHCE, ETHICAL HACKING)
Email Id:-spradhan.iiht@gmail.com
126