FreeBSD Installation Guide

NEW INSTALATION.

For the new installation of the port you have to go to /usr/ports/net-im/openfire directory, execute “make && make install && make clean” command and follow the instructions if any (for example if you don’t install jre yet).

After the installation is completed all the .jar files will be installed to the /usr/local/share/java/classes directory in the way it is recommended by the porters handbook. New directory for the database /var/db/openfire and the logs /var/log/openfire will be created. The conf directory and default .xml file will be copied to /usr/local/etc/openfire directory. /usr/local/etc directory is a standard one in freebsd to store config files. The licence will be copied to /usr/local/share/doc/openfire. All the rest will be stored in /usr/local/share/java/openfire. Also, a startup rc file will be added to the system, namely to the directory /usr/local/etc/rc.d. Rc file is written by me so that the launching of the openfire daemon would have the privileges of the “openfire” user.

Starting the daemon

To automatically launch the daemon after the system is started you need to add this line to /etc/rc.conf:

openfire_enable=“yes”

A few more options is supported in rc.conf file:

openfire_user (username): Set to openfire by default. Set it to required username.

openfire_group (group): Set to openfire by default. Set it to required group.

openfire_libdir (path): Set to /usr/local/share/java/classes by default.Set it to java classes directory.

openfire_home (path): Set to /usr/local/share/java/openfire by default.Set it to java home directory.

openfire_javargs (args): Set to -Xmx256M by default. See java -h for available arguments.

Plugins

Install plugins into /usr/local/share/java/openfire/plugins directory. The plugins menu in the openfire web interface is the best way to do this.

UPGRADE

In case of an upgrade your have to build new port with command “make” first.

Than you should delete previos verson with command “make deinstall”.

On the stage of deleting the previous version of the openfire port by performing “make deinstall” command only those parts will be deleted which are the same as the original. For example, the folder /var/db/openfire will be deleted only if it is empty. The same refers to the plugins and logs folders. The config file will not be deleted if it differs from the default config .xml file.

After the previous version is deleted with the help of the “make deinstall” command you may install a new version from ports by performing the command “make install”.

If everything is ok clean the port directory using “make clean”.

For further information of how to maintain the port system please see here:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html

MIGRATION FROM THE WILDFIRE

In case of migration your have to build new openfire port with command “make” first.

Stop the wildfire server at this point.

After that you should delete wildfire with command “make deinstall” in wildfire port directory.

Then execute “make install” command at the openfire port directory and follow the instructions you’ll see in console:

  1. Stop the wildfire server if it still running.

  2. Back up setup.

  3. Go to /usr/local/etc/openfire and copy configuration from old setup

a) Copy wildfire.xml and rename it to openfire.xml.

b) Search for org.jivesoftware.wildfire. and replace with org.jivesoftware.openfire. in openfire.xml

c) Change owner for configurations files: chown -R openfire:openfire /usr/local/etc/openfire

  1. If using embedded database:

a) Copy and rename files: /var/db/wildfire/wildfire* files to /var/db/openfire/openfire*

b) Change owner for the database files: chown -R openfire:openfire /var/db/openfire

  1. Copy old certificates from resources/security directory to same location in openfire. If you are using self-signed certificates then regenerate them after start up.

  2. Start up the server using new rc script:

a) Add openfire_enable=“YES” into rc.conf file.

b) /usr/local/etc/rc.d/openfire start

  1. Reinstall the plugins.

  2. If at that point you want to downgrade to wildfire 3.2.4 for some reason please be sure to reinstall the wildfire port. If everything is ok clean the port directory using “make clean”.

If you have any questions regarding the port installation procedure please drop me a mail. You can find my email in Makefile in openfire port directory.

What about for a command line, non ports upgrade.

I’ve installed v3.3.1 manually (not using ports), I would now like to upgrade to version 3.3.2, but am not sure the best way. I could do it manually but don’t know which config files I need to save. Do I also need to upgrade the database?

Well you have found a hard way…

I’d recommend to use ports instead of manual installations (I’d suspect you are kind of a Linux guy). You can find a lot of information regarding ports system in FreeBSD handbook. In any case you don’t have to touch your database and configuration files, everything other you can remove. BUT don’t forget to create fresh backup first.

Hi Nikolay, Thanks. Actually I’m a FreeBSD guy, and I would typically use the ports, however I wasn’t able to find openfire in the ports collection so I installed it manually. However, I’ve since found it listed with the old name of wildfire, but I’ve already installed it manually and it works fine.

Hello. There are two of them actually:

net-im/openfire - the new one.

net-im/wildfire - the old one.

I’d recommend to use http://www.freshports.org/ whenever you are trying to find something useful in the ports tree, but you don’t know the name.

Unfortunately the is a ports freeze in effect due to 7.0 release management

process, but the port have been already submitted to ports managers team.

You can wait for about week or i can send you a patch if you prefer.

Done.

http://www.freshports.org/net-im/openfire/

Could you help me, please.

How can i add plugins by hand, which i did’t find in available plugins list, after openfire 3.3 has been installed from port?

If you want to install or upgrade official plugins you can do this via appropriate in admin panel. In case of third party plugins you can copy them to /usr/local/share/java/openfire/plugins directory.