Change the name of the server hostname (CentOS, Red Hat)

Changing the name of the host server you need on ideolog─Źeskim reasons­čÖé
Sometimes it helps to avoid conflicts with DNS and get rid of the brakes system without any visible strain. Here are the commands:
Open the file/etc/sysconfig/network and edit the HOSTNAME = www.example.com.
Next, execute the command
# the hostname www.example.com
Then, open the/etc/hosts file and edit or dobovlâem if there is no such a strings
127.0.0.1 localhost localhost www.example.com. default setting localhost.localdomain
That’s all, after data operation, the server you want to override.