How to modify the DNS of a Linux-based VPS host

Source: Internet
Author: User
Tags centos vps godaddy account godaddy dns godaddy domain godaddy domain name

GoDaddy Domain name Replacement DNS

In many domain name registrars, the use of GoDaddy domain name registrars or mostly. Whether or not the majority of people today support the credit card payment, but its ordinary domain name preferential price is also relatively cheap, is within the acceptable range. We buy the domain name, need to use is the domain name resolution to the website host, many novice in the initial use of the time still has a little difficulty. Because the old left is also a new webmaster, and everyone together from the beginning to share it, for the master of this article is a mouth hydrology, please ignore.

First of all, we landed their GoDaddy account background domain Name list.

We click the launch button that needs to parse the domain name to parse the interface only.
The second step, if we need to use GoDaddy's own DNS, then we will resolve the domain name here, you need to find the location shown in the following figure.

If you are ready to use the DNS resolution domain name, we will need to modify here, first confirm that nameservers is not official, because sometimes we are transferred from other places or to buy push domain name will have the original DNS, so we need to modify.

Click "Set nameservers" and then select the second item is to use the domain name here DNS, if we need to use Third-party DNS, then select the fourth item, and then enter our third party DSN on it.
The third step, to confirm that DNS is not a problem, if we are in the use of GoDaddy DNS, and then we can resolve. Then parse the launch under "DNS Manager" in the second step diagram.

As long as the modification of an IP is our own, and then the upper right corner of the save can not be less. It's as simple as that.

Modify Linux VPS Host DNS address resolution cannot remote wget file problem
There are many netizens will be like the author, for example, after the launch of the VPS will be very accustomed to the direct installation of the required environment (usually this), but probably because we need to download the script data source address problem, can not ensure that the direct reach of the Linux VPS Host Server network is smooth and stable, wget can cause us to install the deployment environment when the installation is incomplete, some files can not be fully downloaded.
In general, we only need to modify the VPS host DNS to solve this problem. For example, directly modify the current VPS host/etc/resolv.conf file DNS for 8.8.8.8, 8.8.4.4 This group of DNS saved after the problem can be resolved. But we certainly have found that after we modify DNS can solve the problem, but restart the VPS after the DNS restored to the original, did not completely get rid of.
So, in this article, the old left?? A spade-薷? PS Host DNS when the process of temporary and permanent replacement of DNS, generally I usually use the time is also used in the temporary modification method, but in order to ensure that no longer trouble replacement, can also use permanent replacement.
First, temporarily modify the current DNS

The code is as follows:

Vi/etc/resolv.conf
The default files are then modified to look like the following figure.

After the modifications are completed, then: Wq saves the exit and then executes the script installation we need should not have much problem. For example, in the Aliyun, Linode installation of some environmental packages, do not modify DNS can not really install.
Second, permanently modify the DNS method
Using the above method, if we restart the VPS, it will be the original default DNS, if we need to permanently modify DNS, then how to operate it? Here, old left take 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 modifying the Save exit, we reboot the VPS and see that the DNS in the/etc/resolv.conf file is our set of fixed DNS.
2. Debian
Most of the methods on the Web are based on CentOS, where the old left-and-right approach to the Debian release is sorted.

The code is as follows:

Vi/etc/dhcp/dhclient.conf
Then add the last line in dhclient.conf

The code is as follows:

Prepend domain-name-servers 8.8.8.8, 8.8.4.4;
Then we save the exit.

Summing up, through the above method, we can temporarily or permanently modify DNS as needed, the old left of the small partners no longer need to worry about the wget when there is no connection problem.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.