Monday, August 11, 2008

Renaming or moving a solaris host

Follow these steps to rename the system:
  • Change the name in /etc/nodename.
  • Change the name in /etc/hostname.xl0 (where xl0 is the name of your network interface)
  • Change the name in /etc/hosts.
  • /etc/dumpadm.conf
  • Move Crash Area
    mv /var/crash/OLDNAME /var/crash/NEWNAME
  • Run the command: hostname new_hostname
Moving to a New Network


Naming Services
Ensure your server has entries in naming services (such as DNS, NIS and LDAP) on the new network. Don't forget to remove the entries on the old network once the server has moved.

Disconnect from Old Network

IP Networking

  • Update IP address(es) in: /etc/hosts, /etc/inet/ipnodes(This is new in Solaris 10) and /etc/hostname.*.
  • Edit /etc/netmasks to reflect the new network.
  • Update the default router (gateway) in /etc/defaultrouter.
  • Update any static routes. You can view the current routing table with netstat -r.

DNS Resolver & Domain Configuration

The domain, name servers and domain searches path are all configured in /etc/resolv.conf. You also need to update /etc/defaultdomain if present (used by NIS, NIS+ and LDAP).

Network Time Configuration

If you use ntpd, you can update the time server in /etc/inet/ntp.conf.

Update Mail (MTA) Configuration

If you use a smarthost this is probably as simple as updating the DS line in /etc/mail/sendmail.cf (this file is generated, so you should update the template in /etc/mail/cf then regenerate it, rather than edit it directly). For more complex configurations refer to the Sendmail documentation: man sendmail.cf is a good start.

NFS Mounts

If your server automatically mounts network shares on other servers you should check they're available on the new network. If they're not, it's best to comment out references to them in /etc/vfstab.

Profile Configuration

You may have web proxies, CVS server roots etc. configured in profile files. It's a good idea to check /etc/.profile, /etc/skel and the profile files of any users.

Connect to New Network

Reboot the Server or Solaris 10 you can use: svcadm restart svc:/network/physical.
Once the server is up on the new network, you should test it thoroughly and ensure monitoring systems can see it

Reboot the server or do the following if you are on console-

OR--
bash-2.05# ifconfig ce0(interface) down
bash-2.05# ifconfig ce0 10.129.0.48 netmask 255.255.0.0
bash-2.05# ifconfig ce0 up

No comments: