How to add Primary and Secondary DNS server – /etc/resolve.conf – Linux

advertisement

Just finished installed CentOS 5. but it can’t recognize any domain. Finally, found out i haven’t add any domain name server (DNS) in my machine. Below is the steps to add domain name server (DNS) in your machine using /etc/resolve.conf file:-

  • Open file /etc/resolve.conf
  • You should see something like this:-

    search localhost.localdomain

    Add your Primary and Secondary Domain Name server (DNS) ip at the end of the file and it should look like this:-

    search localhost.localdomain
    nameserver 888.888.888.888
    nameserver 888.888.888.999

  • Save the file and exit
  • Done! you just added primary and secondary dns server in your machine.
  • To check if your machine works fine, type ping techiecorner.com. If it has reply means your machine work well. If it show unknown host then your configuration has something wrong. Check and rectify it.

Technorati Tags: , , , , , , ,

Related posts:

How to setup static IP in Debian
How to extract password rar file in command line - Linux
How to extract .bz2 file in Linux?
How to setup SSH without password
How to setup syslog server in UBuntu
CPAN Error: make test had returned bad status, won't install without force
How to search files by content in Mac / Linux
SVN: How to commit only modified files via command line






4 Responses to “How to add Primary and Secondary DNS server – /etc/resolve.conf – Linux”

  1. ray says:

    I think you mean /etc/resolv.conf

  2. idsinc says:

    Hi Chua..

    The two dns numbers given, are they the primary and secondary dns, resepectively?

    Regarding LAMP, do you know how it compares to Cpanel?

    Thanx again!

  3. chua says:

    hi idsinc, you can use this OpenDNS server IP:
    208.67.222.222
    208.67.220.220

    just point your domain to your static IP at the Domain Control Panel provided by your registrar. It will allow ppl to access your domain.

    if u wanted to install a hosting server, may be you can check out this:-
    http://www.techiecorner.com/125/how-to-install-lamp-apache-php-and-mysql-in-linux-using-yum/

  4. idsinc says:

    When you Add your Primary and Secondary Domain Name server (DNS) ip at the end of the file , What are those numbers suppose to be? Can you just make up a series of numbers? I don’t know how to do this, so please make up an example.

    If my static IP address is 42.156.331.55, and that is registered with a domain name like dummy.com, do these values have to be recorded in the server somewhere?

    If my domain name through my ISP is dummy.com, should that be the name I give the server? I’m trying to build a hosting server, so that may be helpful to know.

    I installed Centos 5.3, and I don’t even have a desktop screen… just a command prompt… should I have installed an extra application from the list, other than SERVER?

    Any information you can give will be most helpful.

Leave a Reply