We install and deploy OpenFire on Ubuntu fairly regularly. Here is a PARTIAL quick cut/paste from our internal company Wiki. We also pre-install webmin and/or virtualmin on some servers just to make things easier later on:
Pre Install
sudo -s
apt-get update && apt-get dist-upgrade
mkdir /home/kpwadmin/openfire-install
mkdir /home/kpwadmin/virtualmin-install
cd /home/kpwadimn/virtualmin-install
apt-get install sun-java6-jre
Installation
Download the latest .deb package from openfire.org. We will use the 3.6.2 version of Openfire in this article.
cd /home/oacadmin/openfire-install
wget http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3.6.2_all.deb
Install the openfire_3.6.2_all.deb using dpkg
dpkg -i openfire_3.6.2_all.deb
Create a MySQL database for Openfire
Launch firefox and go to serverip/phpmyadmin (example: 72.11.123.59/phpmyadmin), login to phpmyadmin as root.
click privileges
add a new user
Username: openfire
Host: local
Password: "something secure"
Under the section titled "Database for user" click the radio button "create database with same name and grant all privileges"
click 'go'
Web Interface
Open another tab on firefox and go to serverip:9090 (example: 123.0.0.59:9090) to continue the install using the web interface.
select english
Etc, etc, etc.
Hope this helps...