As always, make sure that you have proper backups in place before you change anything.
I think that this would work:
Migrate the database with the backup/restore tools provided by the vendor of your database (eg: mysqldump). Ensure that the database is fully and correctly restored on the new server.
Re-install Openfire on the new server (make sure that you configure it to point at the new database).
Copy the openfire/resources directory from your original Openfire (this is where your certificate stores are)
Copy all plugins that you want to keep
I advice you to shut down (but not delete) your old Openfire AND database, before you verify that everything is back up and running. This ensures that you’re not accidentally using the old stuff.