hostnamectl

To set hostname for your server in CentOS 7, run