configure dns in centos | Unix Linux Forums | Red Hat

  Go Back    


Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions.

configure dns in centos

Red Hat


Tags
centos, dns

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 08-08-2011
programAngel programAngel is offline
Registered User
 
Join Date: Nov 2010
Last Activity: 20 August 2014, 2:40 AM EDT
Posts: 103
Thanks: 47
Thanked 0 Times in 0 Posts
configure dns in centos

Hi, how do I set the DNS in centos.

I don't mean of creating DNS server, but setting what should be the DNS server of centos.

I mean to what server he should go in order to translate url into ip
Sponsored Links
    #2  
Old 08-08-2011
venikathir venikathir is offline
Registered User
 
Join Date: Mar 2011
Last Activity: 20 August 2014, 9:13 AM EDT
Location: Bangalroe-India
Posts: 105
Thanks: 8
Thanked 5 Times in 5 Posts
ur question is not clear
i mean in LAN or public u want,

u want to create new DNS server in ur LAN ? go through the below URL
HOWTO: Setting Up Your Own Local DNS Server - Mark S. Kolich
Sponsored Links
    #3  
Old 08-08-2011
programAngel programAngel is offline
Registered User
 
Join Date: Nov 2010
Last Activity: 20 August 2014, 2:40 AM EDT
Posts: 103
Thanks: 47
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by venikathir View Post
ur question is not clear
i mean in LAN or public u want,

u want to create new DNS server in ur LAN ? go through the below URL
HOWTO: Setting Up Your Own Local DNS Server - Mark S. Kolich
No, I do NOT want to create a DNS server.

I want to tell the centos what is the ip of the DNS server.
Currently for some reason it behave as if it doesn't know any ip.

I mean how do I tell the centos that 8.8.8.8 should be the DNS server that the computer use?
    #4  
Old 08-08-2011
pludi's Avatar
pludi pludi is offline Forum Advisor  
Cat herder
 
Join Date: Dec 2008
Last Activity: 28 March 2014, 8:35 AM EDT
Location: Vienna, Austria, Earth
Posts: 5,522
Thanks: 38
Thanked 335 Times in 308 Posts
There's probably a sysconf-* command, but the direct approach would be adding the line
Code:
nameserver 8.8.8.8

in /etc/resolv.conf .
The Following User Says Thank You to pludi For This Useful Post:
programAngel (08-08-2011)
Sponsored Links
    #5  
Old 08-08-2011
programAngel programAngel is offline
Registered User
 
Join Date: Nov 2010
Last Activity: 20 August 2014, 2:40 AM EDT
Posts: 103
Thanks: 47
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by pludi View Post
There's probably a sysconf-* command, but the direct approach would be adding the line
Code:
nameserver 8.8.8.8

in /etc/resolv.conf .
can you elaborate more about the sysconf-* command.

Because I tried to use it but I could not.
I got a message "command not found ".

Last edited by programAngel; 08-08-2011 at 10:58 AM..
Sponsored Links
    #6  
Old 08-08-2011
pludi's Avatar
pludi pludi is offline Forum Advisor  
Cat herder
 
Join Date: Dec 2008
Last Activity: 28 March 2014, 8:35 AM EDT
Location: Vienna, Austria, Earth
Posts: 5,522
Thanks: 38
Thanked 335 Times in 308 Posts
All the Red Hat derivatives that I know (CentOS, RHEL, Fedora) have commands to configure the system. I never used them since I'm more comfortable editing the config files myself, based on templates, so I actually had to consult with Doctor Google on what they're called: system-config-xxx where xxx are various categories like network, ...
The Following User Says Thank You to pludi For This Useful Post:
programAngel (08-09-2011)
Sponsored Links
    #7  
Old 08-08-2011
bitlord bitlord is offline
Registered User
 
Join Date: Mar 2010
Last Activity: 17 September 2014, 3:57 PM EDT
Posts: 333
Thanks: 12
Thanked 41 Times in 39 Posts
Hey how are you.
I'm a Solaris admin but I have been doing a lot of RHEL administration lately. No matter what UNIX or Linux distro I have work with, the /etc/resolve.conf file is used to point a server to the DNS server. If you don't want to use a editor like vi, then use this command.

Example your DNS server's IP is 10.0.0.1

Code:
echo nameserver 10.0.0.1 >>  /etc/resolve.conf

This should be what you see;

Code:
cat /etc/resolve.conf 
nameserver 10.0.0.1

You can also use the GUI.
System --> Administration --> Network
you can edit the the interfase in this GUI.

I hope this helps

Last edited by bitlord; 08-08-2011 at 04:33 PM..
The Following User Says Thank You to bitlord For This Useful Post:
programAngel (08-09-2011)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
RS 232, CentOS 5.6, gcc 3.4.9 alter_man Programming 0 06-24-2011 08:01 AM



All times are GMT -4. The time now is 02:19 AM.