The host name cannot be a loop back address

I use the centOS image as the base image to install an application. The install takes a responsefile and in it, I set the hostname=localhost. But the install failed and in the log it prints:
The host name cannot be a loop back address.

I guess I can not use “localhost” or “” in the response file.

The application has a browser based admin console. After a success install, I should be able to access the admin console from a remote browser.

Is there some networking setting I need to do for the hostname and the port for the admin console?