Assume you have configured testing environment with WebSphere Application Server V8.0 on SuSE Linux Enterprise Server 11 (SLES 11), and you want to change hostname for some reason - like use cloned VM to test CIM.
Edit /etc/HOSTNAME
file (as root):
ilcbuild@example:~> su - Password: example:~ # vi /etc/HOSTNAME
Delete old name and set new value, for example test317.java.boot.by
. Save and close the file.
example:~ # cat /etc/HOSTNAME test317.java.boot.by example:~ #
Type the following commands:
example:~ # hostname test317.java.boot.by example:~ # hostname test317.java.boot.by example:~ #
Now, you need to edit /etc/hosts
file.
example:~ # vi /etc/hosts
Change all old hostnames with newer one.
example:~ # cat /etc/hosts
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#
127.0.0.1 localhost
# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback
fe00::0 ipv6-localnet
ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
192.168.87.128 test317.java.boot.by test317
Re-login with SSH - shell prompt will have the new hostname now:
Last login: Sat May 18 20:17:05 2013 from 172.16.113.92 ilcbuild@test317:~>
![]() ![]() ![]() |