In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Experimental structure: DNS forward parsing DNS reverse parsing DNS master-slave synchronization 1, DNS forward parsing 1, installing bind toolkit
Enter: yum install bind-y
Through the online yum library installation, only when the bind package is installed can you have the foundation for building DNS services.
2. Modify the global configuration file
Input: vim / etc/named.conf
Modify the global configuration file.
Where, usually only two options need to be modified:
(1) modify the IP address behind the listen-on to listen for port 53 of the native IP--. No matter who resolves the domain name through the native DNS service, it can be heard.
(2) change the allow-query to any--, which allows anyone to use the native DNS service.
3. Modify the zone configuration file
Input: vim / etc/named.rfc1912.zones
Modify the zone profile
Here is the file that adds the domain name and zone data file name
Add the domain name after zone
Add the region data file name after file
4. Modify the zone data configuration file
Specific steps:
(1) enter the directory where the DNS parsing record file is stored
Input: cd / var/named/
(2) copy and rename the template file to "named.yunjisuan" without changing its original attributes.
Enter: cp-p / var/named/named.localhost / var/named/named.yunjisuan
(3) use the VIM editor to enter the configuration file
Input: vim / var/named/named.yunjisuan
Operation example:
(4) start to modify the data file
The result is as follows:
5. Modify your own DNS configuration file
(1) enter the domain name resolution configuration file
Input: vim / etc/resolv.conf
(2) add your own IP address to the VIM editor for later verification of whether the service is valid.
Example:
6. Start the service and verify it
The steps to activate the service are as follows:
Enter:
Systemctl stop firewalld.service--, turn off the firewall
Setenforce 0Mel-turn off enhanced security features
Systemctl start named-- enables DNS service
Systemctl status named-- to view the running status of DNS service
Example:
Perform forward parsing verification
Enter in turn:
Host www.yunjisuan.com
Host ftp.yunjisuan.com
Host http.yunjisuan.com
Host aaa.yunjisuan.com
Corresponding to the IP address resolved by the host name "www", "ftp", "http alias www" and the wrong host name, respectively.
Operation example:
2. Reverse parsing 1. Modify the configuration file of the inverse parsing area
Input: vim / etc/named.rfc1912.zones
Make changes to the following figure
2. Modify the zone data configuration file-reverse parsing
Copy and rename the template file to "niyunjisuan" without changing its original properties
Enter: cp-p / var/named/yunjisuan / var/named/niyunjisuan
3. Modify the corresponding reverse parsing area data configuration file
(1) use the VIM editor to enter the reverse parsing data configuration file
Input: vim / var/named/niyunjisuan
(3) delete the data of the original forward resolution profile, and add the reverse resolution network number and domain name.
Enter: 10 IN PTR www.yunjisuan.com
Operation example:
4. Restart the service and verify reverse resolution
Enter:
Systemctl restart named-- restarts the DNS service
Host 192.168.10.10-reverse resolution to resolve IP addresses to domain names
Operation example:
Third, DNS master-slave synchronization
Open a virtual server as a slave server, and also use the online yum library to install the bind tool.
The white background of all the pictures below is the slave server and the black background is the master server!
1. Modify the global configuration file of the slave server
Input: vim / etc/named.conf
Follow the figure below to make changes:
2. Modify the slave server zone configuration file
Input: vim / etc/named.rfc1912.zones
Modify according to the following figure:
3. Return to the master server and modify the corresponding zone data configuration file
Input: vim / etc/named.rfc1912.zones
Modify according to the following figure:
4. Restart the master server service and start the DNS service from the server.
Enter: systemctl restart named in the primary server
Enter: systemctl start named from the server
Operation example:
5. Verify that the slave server
Input: ls / var/named/slaves
The corresponding zone data configuration file has been backed up.
Operation example:
These are all the contents of the experiment. You are welcome to leave a message for common progress in the comment area below. Any inadequacies in this experiment can also be raised in the comment area.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.