Operating System - HP-UX
1849369 Members
6024 Online
104044 Solutions
New Discussion

Re: Changing the Server NAME

 
SOLVED
Go to solution
Ahmed M. AlShafiy
Regular Advisor

Changing the Server NAME

how can i change the server name so when i order:

#uname -a i get ==>
HP-UX oracle B.11.11 U 9000/800 3652365215 unlimited-user License

i want oracle to be nasjet1
11 REPLIES 11
Ahmed M. AlShafiy
Regular Advisor

Re: Changing the Server NAME

this is the hosts file
Ninad_1
Honored Contributor

Re: Changing the Server NAME

Ahmed,

Use
#/sbin/set_parms newhostname

You will also need to change the entries in /etc/hosts , DNS and for any other software you have installed that may be using the current hostname in any of its configurations.
Refer to the thread
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=934243

Regards,
Ninad
joinsiva
Advisor

Re: Changing the Server NAME

Hi,

You can directly use this command

#uname -S nasjet1


Thanks !
Sivakumar P
Ninad_1
Honored Contributor

Re: Changing the Server NAME

uname -S will change the nodename but will not be effective across server reboots.
/sbin/set_parms will change server names which will be effective across server reboots.

Regards,
Ninad
Ahmed M. AlShafiy
Regular Advisor

Re: Changing the Server NAME

when i try to change it by the set_parms it give me:

#/sbin/set_parms nasjet1
#there is no file such as hostname


but i have change it by editing the file /etc/rc.config.d/netconf

is it correct to change it from there?

coz it work when i order uname -n it give me nasjet1 the new name


Ninad_1
Honored Contributor

Re: Changing the Server NAME

Ahmed,

The command you should have used is
/sbin/set_parms nasjet1
Note : This will require reboot so better to do this when the server is available for reboot. set_parms is the preffered way to manually editting any config files.
Anyhow - what you have done should work. But better to use the set_parms command.

Regards,
Ninad
Ahmed M. AlShafiy
Regular Advisor

Re: Changing the Server NAME

this is what i get from the command

# /sbin/set_parms nasjet1
+ /sbin/set_parms nasjet1
Error: set_parms: Invalid dialog name: nasjet1
Usage: set_parms
Where can be:
hostname
timezone
date_time
root_passwd
ip_address
addl_netwrk
or initial (for entire initial boot-time dialog sequence)


but when i correct the command to be
# /sbin/set_parms nasjet1
+ /sbin/set_parms
+ sh: hostname: Cannot find or open the file.


how can i solve it?
James R. Ferguson
Acclaimed Contributor

Re: Changing the Server NAME

Hi:

'/sbin/set_parms' is an interactive uitlity that will prompt you for its information. Since you want to change your server's hostname, type exactly this (as root):

# /sbin/set_parms hostname

You will now be asked for the actual hostname you want to use. A reboot will occur when you exit this utility.

Regards!

...JRF...
Shameer.V.A
Respected Contributor

Re: Changing the Server NAME

Hi,

You can /etc/rc.config.d/netconf file for changing the server name.

hostname & uname scripts are taking values from the above files when system starts up.

Thanks & Regards,

shameer
.... See invisible, feel intangible and achieve impossible as everything is possible ....
Asif Sharif
Honored Contributor
Solution

Re: Changing the Server NAME

Salam Ahmed,

Please follow these steps to change hostname without reboot :-

1. hostname nasjet1
2. uname -S nasjet1
3. Update HOSTNAME entry in /etc/rc.config.d/netconf file as,
HOSTNAME="nasjet1"


Regards,
Asif Sharif
Regards,
Asif Sharif
Ahmed M. AlShafiy
Regular Advisor

Re: Changing the Server NAME

Thanks all