I want to permanently change the hostname on a Solaris box. How do I do that?
|
feedback
|
|
Assuming that you have allowed the operating system to configure the primary interface for you, there are three (3) files you must change: /etc/hosts /etc/nodename /etc/hostname.<interface> <interface> will be the primary ethernet interface for the system. Some examples (depending on your architecture) will be bge0, hme0, e1000g0, eri0, qfe0. Here's an ad-free answer for future reference. | ||||
feedback
|
|
They don't make it easy, do they? Answer here: http://www.tech-faq.com/change-hostname-solaris.shtml | |||
feedback
|
|
The supported way of doing this is to run the sys-unconfig command, then reconfigure the host with the desired name. | |||
|
feedback
|
|
to piggyback off gary chambers--here's a more authoritative source! His answer is correct though, I give him all the credit for that, but I take a Reaganistic approach to external sources...trust--but verify! http://docs.oracle.com/cd/E19253-01/816-4554/gbwxb/index.html section 5.1: Modifying the IPv4 Address and Other Network Parameters to Persist Across Reboots taken from: System Administration Guide: IP Services > Part II TCP/IP Administration > Chapter 5 Configuring TCP/IP Network Services and IPv4 Addressing (Tasks) > Configuring Systems on the Local Network > How to Change the IPv4 Address and Other Network Configuration Parameters Also in versions earlier than 11/06, do the following: # vi /etc/inet/ipnodes <IPoflocalhost> <updatedhostname> | ||||
|
feedback
|
|
sys-unconfig may be the supported way of doing this, but it completely hoses the entire configuration of the machine and you have to re-configure a reboot (from the LOM or system controller). What a pain. also issue the command hostname new_hostname and a reboot is not required. You must also rename the /var/cras/hostname file and update the /etc/dumpadm.conf file and change the hostname. | |||
|
feedback
|
|
Use: | |||
|
feedback
|
save and exit
| ||||
|
feedback
|