Install JRE
sudo apt-get install openjdk-7-jre
Get the url for the newest version of Openfire from
http://www.igniterealtime.org/downloads/
and download Openfire with wget
wget http://www.igniterealtime.org/downloads/download-landing.jsp?file=openfire/openfire_4_0_1.tar.gz
or download it and move it to the server via scp.
Extract
tar -xvzf openfire_4_0_1.tar.gz
and move to /usr/local/openfire
mv openfire /usr/local/
Open the configfile
vi /usr/local/openfire/conf/openfire.xml
remove the comment for network and insert yours
<network> <interface>123.45.67.89</interface> </network>
Start Openfire
/usr/local/openfire/bin/openfire start
If you havent install MySQL yet, check that site MySQL
Otherwise execute the following two commands
mysqladmin -u root -p create openfire cat /usr/local/openfire/resources/database/openfire_mysql.sql | mysql -u root -p openfire;
Open the interface in your browser
http://123.45.67.89:9090
Click through the setup, at Database Settings select Standard Database Connection
Next screen, select MySQL in the dropdown and insert your hostname (localhost) and database (openfire)
jdbc:mysql://localhost:3306/openfire?rewriteBatchedStatements=true
insert your info and leave settings default.