- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- entries in the /etc/hosts file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2014 03:46 AM - last edited on 10-10-2014 06:34 PM by Lisa198503
10-09-2014 03:46 AM - last edited on 10-10-2014 06:34 PM by Lisa198503
Hi,
Please can you let me know the best practice to follow the format to add the entries in /etc/hosts file for HP-UX 11.31. Need to add 5 SAP servers in /etc/hosts file just in case if DNS server is unavailable. And also please let us know what is the difference between these 2 hosts files.
Format-1
127.0.0.1 localhost loopback
9.11.153.39 hostname.company.pvt hostname
Format-2
127.0.0.1 localhost loopback
9.11.153.39 hostname hostname.company.pvt
Thanks,
Narendra
P.S. This thread has been moved from HP-UX>System Administration to HP-UX > networking. -HP Forum Moderator
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2014 08:08 AM
10-09-2014 08:08 AM
SolutionI always preferred putting the fully qualified host name first and then any aliases after that, like your first example.
According to the man page for hosts:
<QUOTE>
/etc/hosts should contain a single line for each host with the following information:
internet_address official_host_name aliases
<SNIP>
If your system is in a domain naming environment, an official host name consists of the full domain extended host name. For example:
192.45.36.5 hpdxsg.xsg.hp.com hpdxsg testhost
</QUOTE>
If you do an 'nslookup' the results will be slightly different depending on how you have it in /etc/hosts.
For example, based on your first example, your nslookup results (if it looks in /etc/hosts) would be:
# nslookup hostname
Using /etc/hosts on: hostname
looking up in FILES
Name: hostname.company.pvt
Address: 9.11.153.39
Aliases: hostname
Based on your 2nd example, your nslookup results would be:
# nslookup hostname
Using /etc/hosts on: hostname
looking up in FILES
Name: hostname
Address: 9.11.153.39
Aliases: hostname.company.pvt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2014 11:44 PM
10-09-2014 11:44 PM
Re: entries in the /etc/hosts file
Hi Patrick,
Thanks for your reply i do have some more questions as below,
I know if i change the host entries in /etc/hosts file will not require any service restart. The change will take immediate effect once i save the entries in /etc/hosts file.
Do the problem as below still exist or it has been fixed as when we do some changes in /etc/resolv.conf file we have to restart the SAP application.
Presently, HP-UX does not have a Name Service Cache Daemon ; thus, for example, there is no running daemon that can be sent a signal to re-read the contents of the /etc/resolv.conf file.
For this reason, all applications that are compiled and linked to the resolver library under HP-UX, and thus read the /etc/resolv.conf file when started, must be restarted in order for the modifications to the /etc/resolv.conf file to take effect for these applications.
Enhancement Requests have been submitted to HP for the implementation of the Name Service Cache Daemon on HP-UX (QXCR1000519742 and QXCR1000509951).
Thanks,
Narendra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2014 06:20 AM
10-10-2014 06:20 AM
Re: entries in the /etc/hosts file
As far as I know the Name Service Cache daemon has not yet been implemented in HP-UX.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2023 08:23 AM
02-10-2023 08:23 AM
Re: entries in the /etc/hosts file
How do I add a user to a host file on a server ?
For eg. adding a user called oracle on the server
Thank you
Standing by
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2023 12:57 AM
02-15-2023 12:57 AM
Re: entries in the /etc/hosts file
Hello @Afuapee,
Thank you for posting! Since you have posted in an old topic and there is no response yet, we would recommend you to create a new topic using the create "New Discussion" button, so the experts can check and assist you further.
Thanks,
Sunitha G
I'm an HPE employee.
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
