How to Change or Set hostname on OEL/RHEL/CentOS 7
Unlike OEL/RHEL/CentOS 6, manually appending “HOSTNAME=xxxxx” into file /etc/sysconfig/network and restarting system will not work on version 7.
Unlike OEL/RHEL/CentOS 6, manually appending “HOSTNAME=xxxxx” into file /etc/sysconfig/network and restarting system will not work on version 7.