You attempt to install cPanel/WHM on CentOS 7 but was greet with an invalid hostname error.
In this case , changing hostname in network configuration file . Simple way is by issuing the following command:
hostname host.domain.net
Try to reinstall cPanel/WHM. Make sure your hostname contains two dots.
Peace out !