Installing Chat on a remote server
To install Openfire on a remote server
Install Openfire from Smart IT installer bundle, or download openfire from http://www.igniterealtime.org/downloads/ and start Openfire as a service by running openfire/bin/openfire-service.exe.
- After you start Openfire service, set up the service for the first time by performing the following steps:
Set up the Openfire database server.
- Create a database for the Openfire tables:
mysqladmin create [databaseName]
(note: "databaseName" can be something like 'openfire') - Import the schema file from the resources/database directory of the installation folder:
Unix/Linux: cat openfire_mysql.sql | mysql [databaseName];
Windows: type openfire_mysql.sql | mysql [databaseName]; - Start the Openfire setup tool, and use the appropriate JDBC connection settings.
For more information, see http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/database.html
- Create a database for the Openfire tables:
- Specify server name as load balancer name if you are planning to host Openfire service on a cluster. Also, make sure you provide the same admin name and password across all nodes in a cluster when setting up each node for the first time.
- Install the Authentication provider:
- Navigate to the installer location - \windows\Smart_IT\Disk1
- Open files directory.
- Extract the 0p3nf153wn folder outside the installer location so that the extracted folder do not conflict with installer.
- Navigate to 0p3nf153wn.zip\openfire-win-xxx\lib to find the auth-plugin-full.jar.
- Copy the auth-plugin-full.jar file to the openfireInstallDirectory/lib folder.
- Start the Openfire server.
- On the administration console, on the Server > Server Manager > System properties tab, perform the following actions:
- Change the value of the provider.auth.className property to org.jivesoftware.openfire.auth.HybridAuthProvider.
- Create the new hybridAuthProvider.primaryProvider.className property with the org.jivesoftware.openfire.auth.DefaultAuthProvider value.
- Create the new hybridAuthProvider.secondaryProvider.className property with the com.bmc.bsm.galileo.chat.openfire.AuthPlugin value.
Create the new provider.auth.authResource property with the url/rest/users/chat/ value where url is the path to the Smart IT instance (for example, http://<smart-it-server>:9000/smartit).
If Smart IT is on a cluster, the Smart IT server and port has to be substituted with loadbalancer server and port.
- Create a new route.all-resources property with the value true.
This property enables multiple application chat windows to receive the same messages. - (Optional) To set up a multitenant environment, create a new galileo.multitenancy property with the value true.
- Install the Openfire plug-ins:
- Open the admin console and click the Plugins tab.
- Install the Monitoring Service feature.
- Configure the Server > Archiving > Archiving Settings tab as follows:
- Clear the Archive one-to-one chats check box.
- Select the Archive group chats check box.
- Change the value of the Max Message Age field to 0.
- To restrict users' search to only within their group, configure the Search service at Server > Server Settings > Search Service Properties and set the value of the Search Scope field to Group.
- Configure the Smart IT Openfire extension plug-ins: Navigate to 0p3nf153wn.zip\openfire-win-xxx\plugins and copy chat-server-plugin.jar file to the openfireInstallDirectory/plugins folder.
Openfire will pick and deploy the plug-in upon startup or during the run. - Enable HTTP binding and Cross-Origin Resource Sharing (CORS) to allow the Smart IT JavaScript code to connect to Openfire by using HTTP protocol from the browser:
- On the Server > Server Settings > HTTP Binding > HTTP Bind Settings tab, select the Enabled check box and enter the Port and SSL Port field values.
- In the Script Syntax section of the HTTP Bind Settings tab, select the Disabled check box.
- In the Provides support for CORS (Cross-Origin Resource Sharing) section, select the Enabled check box.
- Edit the value of the allow-access-from domain property in the openfire/conf/cross-domain-policy.xml file to allow access to data from a specific domain (or domains), as shown:
Add more domains on separate lines; for example:<allow-access-from domain="domain1.com" to ports="5222,5223,7070,7443" secure="true"/>
<allow-access-from domain="domain2.com" to ports="5222,5223,7070,7443" secure="true"/>- Restart the Openfire service.
- Restart the Smart IT service only after configuring all nodes.
To verify whether Openfire service is enabled
- Check whether you can access admin console on the port listed in Openfire logs when starting Openfire service (default port 7001). You must be able to log on to the admin console (http://<serverName>:7001) when the service is up.
- Open bind URL(servername with bind port as http://<servername>:7070/). You must see the following message: “Openfire HTTP Binding service”.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*