Thursday, August 17, 2017

centos7 - Setting FQDN with external domain name

I have a Centos 7 server which has tens of domain names and IPs.



The IP addresses are pointing to my server.




Each domain name is pointing to its own IP via A record.



I want to configure my FQDN in order to install Postfix.



/etc/hostname contains myproject.localdomain



/etc/hosts contains:



127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6


Command hostname returns:



myproject.localdomain


hostname -f returns:




localhost


domainname returns (none)



Do I have to choose a real domain purchased and prepend to it the hostname like this:



ip    hotname.domainame    hostname

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...