LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-22-2011, 12:59 AM   #1
Darrell22
Member
 
Registered: Nov 2003
Posts: 83

Rep: Reputation: 15
Question domainname not returning anything


Dear Experts,

I've started installing Oracle 11G on Linux.

Part of the instructions say to configure the server with a (fqdn) fully qualified domain name.

I've followed the instructions I've been able to find, but I still can't get the command, domainname, to return anything.

This will be a stand alone machine for self study at home.
Named: black.

As for the domain name, I've been using my own domain, hosted elsewhere. Say, testrac.com (not the actual name).

The hostname is: black.testrac.com

Here is the output for some commands and files:


uname -a
Linux black 2.6.18-194.el5xen #1 SMP Mon Mar 29 22:22:00 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.5 (Tikanga)

cat /etc/enterprise-release
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)

cat /etc/issue
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)


cat /etc/nsswitch.conf | grep hosts
#hosts: db files nisplus nis dns
hosts: files dns


/etc/resolv.conf

nameserver 192.168.2.1


/etc/sysconfig/network

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=black.testrac.com
DOMAINNAME=testrac.com


/etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.2.201 black.testrac.com black


Note that it is a static IP address.


ping black
PING black.testrac.com (192.168.2.201) 56(84) bytes of data.
64 bytes from black.testrac.com (192.168.2.201): icmp_seq=1 ttl=64 time=0.048 ms

[root@black ~]# ping black.testrac.com
PING black.testrac.com (192.168.2.201) 56(84) bytes of data.
64 bytes from black.testrac.com (192.168.2.201): icmp_seq=1 ttl=64 time=0.054 ms


route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 * 255.255.255.0 U 0 0 0 eth1
192.168.2.0 * 255.255.255.0 U 0 0 0 eth0
192.168.122.0 * 255.255.255.0 U 0 0 0 virbr0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default . 0.0.0.0 UG 0 0 0 eth1



hostname
black.testrac.com

hostname --fqdn
black.testrac.com



dnsdomainname
testrac.com



domainname
(none)


What is the secret to getting a fully qualified domain name, such that the command, domainname will work?


Thanks a lot!
 
Old 11-22-2011, 01:08 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

From the man page for domainname:
Code:
domainname - show or set the system's NIS/YP domain name
So the first question is: do you have a NIS/YP server running? If not, then there's no real use for this I think. You can set your FQDN to whatever you want since you'll be working only locally and in your resolv.conf you're pointing first to files, so if you configured it in your hosts file, it should work. In my opinion this has nothing to do with the domainname command not resolving. If you really need it, you can set it with the domainname command (man page).

Kind regards,

Eric
 
Old 11-29-2011, 02:07 AM   #3
Darrell22
Member
 
Registered: Nov 2003
Posts: 83

Original Poster
Rep: Reputation: 15
Discovering the secret

gedit /etc/sysctl.conf

add:
kernel.domainname=testrac.com

Works!
 
  


Reply

Tags
domain



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
domainname? kalleanka General 2 06-12-2005 04:53 PM
sendmail and domainname zeky Linux - Networking 4 05-02-2005 01:09 PM
domainname pkp2372 Linux - Newbie 1 02-24-2004 10:40 AM
Problem with domainname rot Linux - Networking 4 08-11-2003 04:19 AM
domainname kevv Linux - Networking 1 05-03-2002 10:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration