GOOGLE Search

Google
 

Thursday, January 31, 2008

Linux Tip No. 9: Setting your hostname

Setting your hostname

File: /etc/sysconfig/network

[root@proxy sysconfig]# more network

NETWORKING=yes

HOSTNAME=localhost.localdomain

Example:

Edit the file

[root@proxy docadmin]# cat /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=proxy.jepoy.net

[root@proxy docadmin]# /sbin/service network restart
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Disabling IPv4 packet forwarding: net.ipv4.ip_forward = 0
[ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Bringing up interface eth1: [ OK ]

[root@proxy docadmin]# hostname

proxy.jepoy.net

No comments: