[CentOS] Reg. setting Domain name on Cento 5 pc

Johnny Hughes johnny at centos.org
Thu Jun 12 11:32:53 UTC 2008


Padmaja R wrote:
> Hi,
> thanks for the reply, I sometime back changed the hostname using the
> /etc/sysconfig/network only. However, that only has 2 lines in it-
> Networking=Yes, Hostname=sipx.com
> 
> Where can I edit the dnsdomainname and domainname variables? I do not see
> those variables in /etc/hosts or /etc/sysconfig/network.
> 
> Thank You
> 
> 
> 
> On Thu, Jun 12, 2008 at 1:41 PM, mkn0014 <mkn0014 at gmail.com> wrote:
> 
>> Padmaja R wrote:
>>
>>> Hi all,
>>>
>>> I am running centos 5.1 and I wish to change the domain name and
>>> dnsdomainname of my PC. currently the settings are--
>>>
>>> $ hostname
>>> sipx.com <http://sipx.com>
>>> $ hostname --fqdn
>>> sipx.com <http://sipx.com>
>>> $ domainname
>>> (none)
>>> $ dnsdomainname
>>> com
>>>
>>> I have searched in the net for tips but everywhere only the hostname
>>> change is provided. I need to change/set the domain name and the dnsdomain
>>> name on my pc to sipx.com <http://sipx.com> and this should be a
>>> permanent one across system reboots. Please let me know how to do this.  The
>>> domain name settings are required for a networking/ SIP telephony
>>> applications that I am running but it is internally in the LAN, so I think
>>> the name sipx.com <http://sipx.com> if chosen as my pc's domain name will
>>> not cause any conflict with the external domain names in the Internet.
>>>
>>> Thank You
>>>
>> Edit /etc/sysconfig/network
>> Restart

IF you have 3 names in your host name it will work ... it will not work 
with just 2 names.

you need host.domain.com

right now, your host is sipx ... you have NO DOMAIN NAME except .com

you can easily then also set and alias in /etc/hosts to sipx.com ... and 
also use an alias in apache as well.

If you use a proper FQDN with 3 names then everything will "JUST WORK" ....

Take this name that I use:  myth.home.local

$ hostname
myth.home.local

$ hostname --fqdn
myth.home.local

$ dnsdomainname
home.local

Note:  use also used the domainname command, that command has nothing to 
do with dns names, but with "the system’s NIS/YP domain name".

Thanks,
Johnny Hughes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://lists.centos.org/pipermail/centos/attachments/20080612/e530d6ce/signature.bin


More information about the CentOS mailing list