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:
-
Stop the wildfire server if it still running.
-
Back up setup.
-
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
- 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
- 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.
- 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
-
Reinstall the plugins.
-
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.