Monday, February 16, 2009

Change Hostname on Fedora 9 (Linux System)

The prompt before setting
Code :
[msmunir@localhost home]$ uname -a
Linux localhost.localdomain 2.6.15-1.2054_IGN1 #1 Fri Jun 30 10:01:26 WIT 2006 i686
i686 i386 GNU/Linux
[msmunir@localhost home]$


See the content of /etc/hosts file :

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost
202.46.3.114 psjumat2.batan.go.id psjumat2


Or you can see another sample of /etc/hosts file :

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost psjumat2
::1 localhost.localdomain localhost psjumat2

Another example

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
202.46.3.98 psjumat2 psjumat psjumat2.batan.go.id

Based on these examples, you make many alias, such as psjumat, psjumat2 or psjumat2.batan.go.id.

Restart your named service
Code :
[root@localhost etc]# /etc/rc.d/init.d/named restart
Stopping named: [FAILED]
Starting named: [ OK ]
[root@localhost etc]#

Reboot your host
Code :
[root@localhost etc]# reboot

After reboot, prompt has changed like this
Code :
[msmunir@psjumat4 ~]$ uname -a
Linux psjumat4.batan.go.id 2.6.15-1.2054_IGN1 #1 Fri Jun 30 10:01:26 WIT 2006 i686
i686 i386 GNU/Linux
[msmunir@psjumat4 ~]$

Compare with the beginning of prompt.

by.msmunir@batan.go.id

No comments:

Post a Comment