I just did a fresh install of Openfire on Gentoo using portage and everything appeared to go smoothly, except that when I get to the end of the setup process and click the button to log in as admin, it just restarts the setup process again. I’m using MySQL as the database backend.
This sounds like the user that is running the Openfire process is not able to write to the openfire.xml config file. Could you double check it?
Creating a user, other than root, in MySQL fixed this for me. I guess root cannot write the config files.