In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to modify the DNS of the VPS host of the Linux system". In the daily operation, I believe that many people have doubts about how to modify the DNS of the VPS host of the Linux system. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the doubt of "how to modify the DNS of the VPS host of the Linux system!" Next, please follow the editor to study!
Change the Godaddy domain name to DNS
Among the many domain name registrars, most of them use godaddy domain name registrars. No matter whether most people support credit card payment or not, the discount price of the ordinary domain name is also relatively cheap, which is within the acceptable range. After we buy a domain name, what we need to use is to resolve the domain name to the host of the website, and many beginners still have a little difficulty in using it for the first time. Because Lao Zuo is also the new webmaster, let's share it from the beginning with you. For the master, this article can be regarded as oral hydrology, please ignore it.
First of all, we log in to the backend domain name list of our godaddy account.
We only need to resolve the interface by clicking the Launch button after the domain name to be resolved.
Second, if we need to use Godaddy's own DNS, then we will resolve the domain name here and need to find the location shown in the following figure.
If we are going to use our own DNS to resolve the domain name, we need to modify it here to make sure that Nameservers is official, because sometimes we transferred it from other places or bought the domain name of PUSH with the original DNS, so we need to modify it.
Click "Set Nameservers" and select the second item is to use the domain name on the DNS here. If we need to use a third-party DNS, select the fourth item, and then enter our third-party DSN.
The third step is to make sure that there is no problem with DNS, provided that we are using GODADDY's DNS before we can parse it. Then parse the Launch under "DNS Manager" in the second step diagram.
As long as we modify an IP is our own, and then the upper right corner of the save can not be less. It's that simple.
Modify the DNS address of Linux VPS host to solve the problem of unable remote wget file
There should be many netizens like the author, for example, after activating VPS, they will be used to directly installing the required environment (usually this is the case), but it may be because of the address of the script data source that we need to download from wget, we cannot ensure that the network directly reaching the Linux VPS host server is unblocked and stable, which will cause us to install the deployment environment with incomplete installation and some files cannot be downloaded completely.
In general, we only need to modify the DNS of the VPS host to solve this problem. For example, the problem can be solved by directly modifying the DNS in the / etc/resolv.conf file of the current VPS host to 8.8.8.8 and 8.8.4.4. But we must have found that the problem can be solved after we modify DNS, but after restarting VPS, DNS is back to the original and has not been completely changed.
Therefore, in this article, Lao Zuo notes that when we modify the VPS host DNS, we change the DNS temporarily and permanently. I usually use the temporary modification method when I use it, but in order to ensure that it will not be troublesome to replace it in the future, we can also use permanent replacement.
First, temporarily modify the current DNS
The code is as follows:
Vi / etc/resolv.conf
Then modify the default files as shown in the following figure.
After the modification, then: wq saves and exits, and then executes the script installation we need should not have much of a problem. For example, when installing some environment packages on Aliyun and Linode, it is really impossible to install DNS without modifying it.
Second, permanently modify the DNS method
Using the above method, if we restart VPS, it will be the original default DNS, if we need to permanently modify the DNS, what should we do? Here, Lao Zuo takes the CentOS system test.
1 、 centos
The code is as follows:
Vi / etc/sysconfig/network-scripts/ifcfg-eth0
Add in the last two lines:
The code is as follows:
DNS1=8.8.8.8
DNS2=8.8.4.4
After the modification and save exit, when we restart VPS, we will see that the DNS in the / etc/resolv.conf file is the fixed DNS we set.
2 、 debian
Most of the methods on the Internet are based on centos, and here Lao Zuo collates the method of debian distribution.
The code is as follows:
Vi / etc/dhcp/dhclient.conf
Then add it on the last line of dhclient.conf
The code is as follows:
Prepend domain-name-servers 8.8.8.8, 8.8.4.4
Then we save the exit.
At this point, the study on "how to modify the DNS of the VPS host of the Linux system" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.