Don't know why it tries to setup before getting configuration files...(though it could work if it already had configuration files).
You have to create a krb5.conf file to define the realm (both for clients and the KDC master, and hopefully a slave). Then the krb5_newrealm can do some of the following (can't do the slave stuff though)
Then you have to create the realm database for realm on the KDC.
After that you can start the KDC server(s) on the master (for password updates and the database)
create a user principal (for testing at a minimum), and see if you can do a kinit for that principal.
Define keytabs for the master, and start any kerberos services (ours only used ssh).
create a user principal (for testing at a minimum).
Define keytabs for the slave, and start any services...
start the slave server so that the master can propagate the initial data to the slave.
Take the krb5.conf file used and install it on a client system, and try a kinit.
If everything still works you are ready to create keytabs for any application servers and users.