Difference between revisions of "Openfire"

From SME Server
Jump to navigationJump to search
m
(Added dependency for SME 9.0)
Line 1: Line 1:
 
===Description===
 
===Description===
Openfire (formerly Wildfire) is a real time collaboration (RTC) server dual-licensed under the Open Source GPL and commercially. It uses the only widely adopted open protocol for instant messaging, XMPP (also called Jabber). Openfire is incredibly easy to setup and administer, but offers rock-solid security and performance.
+
Openfire (formerly Wildfire) is a real time collaboration (RTC) server dual-licensed under the Open Source GPL and commercially. It uses the only widely adopted open protocol for instant messaging, XMPP (also called Jabber). Openfire is easy to setup and administer, but offers rock-solid security and performance.
 
 
  
 +
== Prerequisite for SME 9.x ==
 +
The Java Runtime Environment included in the Openfire RPM requires that an additional library be installed 64-bit versions of SME 9.0.  To install it, run
 +
# yum install glibc.i686
  
 
== Download and install Openfire ==
 
== Download and install Openfire ==
  
http://www.igniterealtime.org/downloads/index.jsp
+
You can find the latest version of Openfire at http://www.igniterealtime.org/downloads/index.jsp.  Download the RPM to your SME server, then run
  
  yum localinstall openfire-*.rpm
+
  # yum install openfire-*.rpm
  
 
== Create the Database ==
 
== Create the Database ==
Line 14: Line 16:
 
To create the Openfire Database, you'll need to perform each of the following steps:  
 
To create the Openfire Database, you'll need to perform each of the following steps:  
  
  mysqladmin create openfiredb
+
  # mysqladmin create openfiredb
  mysql -e "grant all privileges on openfiredb.* to openfireuser@localhost identified by 'yourpassword'"
+
  # mysql -e "grant all privileges on openfiredb.* to openfireuser@localhost identified by 'yourpassword'"
  mysql -e "flush privileges"
+
  # mysql -e "flush privileges"
  
 
{{Warning box|You may wish to alter the "openfireuser" and "yourpassword" information in the grant privileges line above. Be sure to remember to remember what you used as the web manager will ask you for it!}}
 
{{Warning box|You may wish to alter the "openfireuser" and "yourpassword" information in the grant privileges line above. Be sure to remember to remember what you used as the web manager will ask you for it!}}
  
Edit the database schema:
+
Edit the database schema (this change does not seem to be necessary with SME 9.0 and Openfire 3.9.3):
  
 
  # cd /opt/openfire/resources/database
 
  # cd /opt/openfire/resources/database
  # mcedit openfire_mysql.sql
+
  # nano openfire_mysql.sql
  
 
At line 57 starts:
 
At line 57 starts:
Line 99: Line 101:
 
Create and edit a file called "99openfire"
 
Create and edit a file called "99openfire"
  
  pico -w 99openfire
+
  nano -w 99openfire
  
 
(add the code shown below to the template)
 
(add the code shown below to the template)

Revision as of 21:49, 21 April 2015

Description

Openfire (formerly Wildfire) is a real time collaboration (RTC) server dual-licensed under the Open Source GPL and commercially. It uses the only widely adopted open protocol for instant messaging, XMPP (also called Jabber). Openfire is easy to setup and administer, but offers rock-solid security and performance.

Prerequisite for SME 9.x

The Java Runtime Environment included in the Openfire RPM requires that an additional library be installed 64-bit versions of SME 9.0. To install it, run

# yum install glibc.i686

Download and install Openfire

You can find the latest version of Openfire at http://www.igniterealtime.org/downloads/index.jsp. Download the RPM to your SME server, then run

# yum install openfire-*.rpm

Create the Database

To create the Openfire Database, you'll need to perform each of the following steps:

# mysqladmin create openfiredb
# mysql -e "grant all privileges on openfiredb.* to openfireuser@localhost identified by 'yourpassword'"
# mysql -e "flush privileges"


Warning.png Warning:
You may wish to alter the "openfireuser" and "yourpassword" information in the grant privileges line above. Be sure to remember to remember what you used as the web manager will ask you for it!


Edit the database schema (this change does not seem to be necessary with SME 9.0 and Openfire 3.9.3):

# cd /opt/openfire/resources/database
# nano openfire_mysql.sql

At line 57 starts:

CREATE TABLE ofRoster (
  rosterID              BIGINT          NOT NULL,
  username              VARCHAR(64)     NOT NULL,
  jid                   VARCHAR(1024)   NOT NULL,

Change the jid line from 1024 to 255 as shown:

  jid                   VARCHAR(255)    NOT NULL,

Import the revised database schema:

# mysql openfiredb < openfire_mysql.sql

Access MySQL from the local network

To use the MySQL database you will need to run a script to make port 3306 available to the Openfire Instant Messaging Server.

/sbin/e-smith/config setprop mysqld LocalNetworkingOnly no
/sbin/e-smith/expand-template /etc/my.cnf
/etc/rc.d/rc7.d/S50mysqld restart

Start the Openfire Messaging Server

/etc/rc.d/init.d/openfire start

Visit admin web page to complete Openfire configuration

Go to http://yourserver:9090 (insecure) or https://yourserver:9091 (secure)and follow through the setup via the browser. The only area that may be confusing is the database setup area. See example configuration below.

Openfire 1.jpg

Openfire 2.jpg

Openfire 3.jpg



Database Driver Presets: MySql

JDBC Driver Class: com.mysql.jdbc.Driver


Database URL: jdbc:mysql://localhost:3306/openfiredb

Username: openfireuser

Password: yourpassword

Openfire 4.jpg

SME Server specific configuration

config set openfire service TCPPorts '5222,5223,7777' access public status enabled
signal-event remoteaccess-update

Add startup link:

ln -s /etc/rc.d/init.d/e-smith-service /etc/rc.d/rc7.d/S99openfire

Optional

If you would like to have web access to the openfire documentation has been installed on your server, this section will show you how to make an e-smith custom template.

Make the custom-template directory:

mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf

Create and edit a file called "99openfire"

nano -w 99openfire

(add the code shown below to the template) (you can select and copy then paste in PuTTY with right click)

# Openfire instant messaging server

Alias /openfiredocs /opt/openfire/documentation/docs

<Directory /opt/openfire/documentation/docs>
     AddType application/x-httpd-php .php .php3 .phtml
     Options Indexes +Includes FollowSymLinks
     order deny,allow
     deny from all
     allow from all
</Directory>

# end of Openfire fragment

ctrl-x to save, y to agree, and [Enter] to exit the PICO editor

Expand the template

expand-template /etc/httpd/conf/httpd.conf
/etc/rc.d/init.d/httpd-e-smith restart

access your documentation at:

http://yourservername-or-IP/openfiredocs/

To reiterate, this is NOT an essential step in the installation process and only provides local access to the documentation.

Uninstalling Openfire

Commands to remove openfire

/etc/rc.d/init.d/openfire stop
yum remove openfire
rm -Rf /opt/openfire
mysqladmin drop openfiredb
config delete openfire
signal-event remoteaccess-update