lunedì 10 marzo 2014

Cenots set Fully Qualified Domain Name Glasshfish problem

How to configure fqdn on centos for your linux box on private lan
Remeber that domain must be always full qualified,  domain + extension  (local + .com)

Example data:
Server Name ----------------------------------- gffp01t
Static ip ----------------------------------------- 192.168.1.191
Local domain (for your lan example) ------ local.com 

1 Edit Hosts File
$ sudo vim /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
127.0.0.1 gffp01t.local.com gffp01t
192.168.1.191 gffp01t.local.com gffp01t
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 
::1 gffp01t.local.com gffp01t

2 Edit network $ sudo vim  /etc/sysconfig/network HOSTNAME=gffp01t.local.com

.....
Reboot system  
.....

4 Verify
$ hostname
(output) gffp01t.local.com
$ hostname -f
(output) gffp01t.local.com