jExperience quick install

December 21, 2021

This topic shows you how to run jExperience on a local environment. To run jExperience you:

  • Install the Java JDK, Elasticsearch, and jCustomer (the Jahia distribution of Apache Unomi)
  • Deploy the jExperience module in Jahia
  • Configure the connection between jExperience and jCustomer
Note: For information on advanced configuration, security recommendations, and clustering, see Installing and configuring jExperience

Installing the JDK

Install JDK 8 (see Oracle Java SE Downloads) and set the JAVA_HOME variable (see Oracle's Installing the JDK Software and Setting JAVA_HOME documentation).

Installing and configuring Elasticsearch

You can find the Elasticsearch prerequisites here:

To install and configure Elasticsearch:

  1. Download and unzip Elasticsearch 5.6.16.
  2. Edit the config/elasticsearch.yml file and change property to your own cluster name. It's important to use a dedicated cluster name because Elasticsearch will automatically try to connect with other servers on the same network, leading to conflicts between each local environment. For example, you can change the property value to myclustername. myclustername
    Note: The pound sign (#) comments out properties in the file. Remember to remove the pound sign when you specify the cluster name.
  3. Start Elasticsearch. 

Installing jCustomer

Install jCustomer and create a properties file that specifies your Elasticsearch cluster name.

To install jCustomer:

  1. Download and unzip jCustomer 1.4.1 here or login to the Customer Center to access the download.
  2. After unzipping, navigate to the jcustomer-1.4.1-jahia/etc folder.
  3. Create a new .properties file and name it
  4. Add the following entry to the file:<yourClusterName> where <yourClusterName> is the cluster name that you specified for Elasticsearch earlier. For example:
  5. Save the file.
  6. (Optional) jCustomer requires an IP database to resolve IP addresses to the user location. The GeoLite2 database can be downloaded from MaxMind here:
    Simply download the GeoLite2-City.mmdb file into the etc directory.
  7. (Optional) jCustomer includes a geocoding service based on the Geonames database that is used to create conditions on countries or cities.
    Get the database from here: Download it and put it in the etc directory without unzipping it. The import can take about 15 minutes and runs in the background.
  8. Start jCustomer using the following command.
  9. On the first start, you also must execute the following command.
    Wait for startup to complete. This step is not necessary on future server startups. The jCustomer bundles (packages) will start automatically.
  10. Try accessing https://localhost:9443/cxs/cluster with username karaf and password karaf . If you receive a certificate warning in your browser, accept the warning as it is safe.
  11. You can try accessing https://localhost:9443/cxs to check the available jCustomer services.

Enabling jExperience modules

If your server does not have access to internet, download the module from the Jahia store  and deploy it to your Jahia server. If the server on which your Jahia Enterprise Distribution is running can access the internet, follow the steps below.

Note: For information on installing a module, see the Installing a module tutorial.

To enable jExperience modules:

  1. Open your Jahia Enterprise Distribution instance, and navigate to Administration>System components>Modules.
  2. Click on Available modules and type jExperience in the Search module by keyword field.
  3. Select the jExperience module and click Download.
  4. Once the download completes, select Installed modules, locate the jExperience module. The status should be Started.
  5. Click the module. In Usage in sites, enable the module for each site where you want to use it.

Configuring the jExperience connection to jCustomer

Once the jExperience module is started, it requires a configuration file to connect to jCustomer.

To configure the jExperience connection to jCustomer:

  1. In your Jahia installation folder, navigate to the digital-factory-data/karaf/etc subfolder. For example, navigate to:
  2. Create a new .cfg file named org.jahia.modules.jexperience.settings-global.cfg. Either create a file from scratch or download this sample file
  3. Edit the following properties (or copy-paste the text below):
    # Mandatory connection properties are:
    # Optional properties and there default value:
    # Trust all certificate
    # Use public addresses for admin
    # Unomi KEY

    The configuration reloads without restarting the Jahia server. 

  4. In the same folder, find and remove any other files starting with org.jahia.modules.jexperience.settings.
  5. If you want to use the "personalization using geolocation by point" feature, you must add a Google API key to the parameter "jexperience.googleAPIKey". If you don't have one, you can request it here:
  6. To verify that the connection is working:
    1. Go to Jahia>Edit Mode on any site where jExperience is enabled. Then select Site settings>Manage connection to jCustomer
    2. Verify that the jCustomer Status: ONLINE.
You can now use jExperience.