Server hostname 변경

ITWeb/서버관리 2011. 9. 7. 09:55

아래와 같이 하면 변경이 가능합니다.

변경 후 reboot 하셔야 합니다.

 

1. root user 로 로그인

2. cd /etc/sysconfig

3. vi network

4. shutdown -r now

 

 

usage: reboot [-n] [-w] [-d] [-f] [-h] [-i]

        -n: don't sync before halting the system

        -w: only write a wtmp reboot record and exit.

        -d: don't write a wtmp record.

        -f: force halt/reboot, don't call shutdown.

        -h: put harddisks in standby mode.

        -i: shut down all network interfaces.

 

 

 

Usage:    shutdown [-akrhHPfnc] [-t secs] time [warning message]
                  -a:      use /etc/shutdown.allow
                  -k:      don't really shutdown, only warn.
                  -r:      reboot after shutdown.
                  -h:      halt after shutdown.
                  -P:      halt action is to turn off power.
                  -H:      halt action is to just halt.
                  -f:      do a 'fast' reboot (skip fsck).
                  -F:      Force fsck on reboot.
                  -n:      do not go through "init" but go down real fast.
                  -c:      cancel a running shutdown.
                  -t secs: delay between warning and kill signal.
                  ** the "time" argument is mandatory! (try "now") **

 

: