When you have not set your server's hostname properly, you will see some of the security and verification processes are not right. To fix this issue, you can set your Hostname easily.
For linux distributions similar to Ubuntu:
hostnamectl set-hostname server.localhost
For linux distributions similar to CentOS:
We have set hostname server.localhost in the example shown in above. You can change it to anything you want just looks similar shown in below.
Lets add newly defined hostname to network configuration. Open hosts file with an editor such like nano and add hostname refers to 127.0.0.1
Open hosts file with an editor such like nano:
sudo nano /etc/sysconfig/network
Add or modify existing HOSTNAME data shown in below.