Installing Chat on a remote server


If your organization uses the chat feature extensively, you can run Openfire chat on a remote server to improve performance. 

 

To install Openfire on a remote server

  1. 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

    Note:

    Smart IT version 19.08 supports Openfire version 4.2.3.

    If Openfire is being installed on the same VM as Smart IT, ensure that the Openfire admin console uses a port other than 9090, which is reserved for the Apache Tomcat service.

    When you open Admin console for the first time, you are prompted to configure Openfire. Admin console URL is listed on the console or in Openfire logs after user starts Openfire service. 

  2. After you start Openfire service, set up the service for the first time by performing the following steps: 
    1. Set up the Openfire database server.

      1. Create a database for the Openfire tables:
        mysqladmin create [databaseName]
        (note: "databaseName" can be something like 'openfire')
      2. 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];
      3. 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

    2. 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. 
    3. Install the Authentication provider:
      1. Navigate to the installer location - \windows\Smart_IT\Disk1
      2. Open files directory.
      3. Extract the 0p3nf153wn folder outside the installer location so that the extracted folder do not conflict with installer.
      4. Navigate to 0p3nf153wn.zip\openfire-win-xxx\lib to find the auth-plugin-full.jar.
      5. Copy the auth-plugin-full.jar file to the openfireInstallDirectory/lib folder.
      6. Start the Openfire server.
      7. On the administration console, on the Server > Server Manager > System properties tab, perform the following actions:
      8. Change the value of the provider.auth.className property to org.jivesoftware.openfire.auth.HybridAuthProvider.
      9. Create the new hybridAuthProvider.primaryProvider.className property with the org.jivesoftware.openfire.auth.DefaultAuthProvider value.
      10. Create the new hybridAuthProvider.secondaryProvider.className property with the com.bmc.bsm.galileo.chat.openfire.AuthPlugin value. 

        openfire.PNG
      11. 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). 

        http://<smart-it-server>:9000/smartit/rest/users/chat/If Smart IT is on a cluster, the Smart IT server and port has to be substituted with loadbalancer server and port.

      12. Create a new route.all-resources property with the value true.
        This property enables multiple application chat windows to receive the same messages.
      13. (Optional) To set up a multitenant environment, create a new galileo.multitenancy property with the value true.
    4. Install the Openfire plug-ins:
      1. Open the admin console and click the Plugins tab.
      2. Install the Monitoring Service feature.
    5. Configure the Server > Archiving > Archiving Settings tab as follows:
      1. Clear the Archive one-to-one chats check box.
      2. Select the Archive group chats check box.
      3. Change the value of the Max Message Age field to 0.
    6. 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
    7. 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.
    8. 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:
      1. 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.
      2. In the Script Syntax section of the HTTP Bind Settings tab, select the Disabled check box.
      3. In the Provides support for CORS (Cross-Origin Resource Sharing) section, select the Enabled check box.

        Openfire conf 4.png
    9. 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:
    10. allow_access_setting2.gif
      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"/> 

      Best practice
      The default value is set to ‘*’ (asterisk), which allows access to data from any domain. We recommend that you change the value to allow access only from a specific domain (or domains). 

    11. Restart the Openfire service.
    12. Restart the Smart IT service only after configuring all nodes.  

To verify whether Openfire service is enabled

  1. 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. 
  2. 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*