HowTo: Set up the openfire (ex wildfire) jabber-server on debian
In case anyone of you nerds out there ever wanted to run an own jabber server: This is a quick guide on how to set up the openfire (formerly known as wildfire) jabber-server on debian etch with mysql as the datastore-backend.
I assume that you have a working installation of the Java-VM somewhere on your machine. The openfire startup-script searches for a JVM in some common places on your system like /usr , etc. If you have a custom installation like I have, you should put the JAVA_HOME variable in your shell-environment.
- Download the most current package from the Ignite Realtime site.
The version I refer to in this guide is openfire 3.3.2 - Unzip the package to a folder where you want the installation to live in. In my case this is /opt
cd /opt tar xzvf openfire_3_3_2.tar.gz
This will create the subfolder “openfire”.
- Now you should create a non priviledged user and group the service will use to run as and assign him the base-dir of the openfire installation as homedir:
groupadd jabber useradd -d /opt/openfire -g jabber jabber
- The home-dir should also be owned by the newly created user and group:
chown -R jabber:jabber /opt/openfire
- Create a mysql-database for openfire:
mysql -u root -p yourmysqlrootpw
create database jabber; grant all on jabber.* to jabber@localhost IDENTIFIED BY "pwfornewuser";
- Change to the new user and start the server:
su - jabber cd /opt/openfire/bin ./openfire start
- Now, if you run
netstat -tulpen
you should see a java-process listening on ports 9090 and 9091 after a few moments.
Server up and running. - To set up the basic configuration, you have to open the admin-interface in your browser:
http://<iporhstnameofyourjabberserver>:9090 - The basic setup is pretty staight forward. You have to choose a language setting, provide the connection-string (e.g.: jdbc:mysql://127.0.0.1:3306/jabber) and user+password for your mysql-db, a password for the admin-account of openfire and that´s it.
- Of course you also have to make sure that the ports 5222 and 5223 (for ssl client-connections) are not firewalled since then you won´t be able to connect your client to the new server
For server to server connections and file transfers you also need to open port 5269 and 7777. Server to server connections are necessary if you want to be able to communicate with people who are not logged on to your jabber-server.
If I find time, I might add some screens in the next couple of days.
If you have any questions or like to comment, feel free to do so
cheers
~ Gerrit
Nice howto, I found another one that walked through setting openfire into init.d – I kind of liked that better for a boot up idea. Only thing I need to fix is to have it launch as user jabber on boot. Anyway, migrating from Freebsd to debian, so your howto helped, thanks.
ln -s /opt/openfire/bin/openfire /etc/init.d/
chmod +x /etc/init.d/openfire
update-rc.d openfire defaults
Thanks, mate!
Thought about addind a part about autostart at boot, as well, but never got to it
Maybe I’ll just add your approach later to complete the thing.
cheers
~ Gerrit