jExperience quick install
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
Installing the JDK
Installing and configuring Elasticsearch
You can find the Elasticsearch prerequisites here: https://www.elastic.co/guide/en/elasticsearch/reference/current/setup.html
To install and configure Elasticsearch:
- Download and unzip Elasticsearch 5.6.16.
- Edit the
config/elasticsearch.ymlfile and change the
cluster.nameproperty 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
cluster.name: myclusternameNote: The pound sign (#) comments out properties in the file. Remember to remove the pound sign when you specify the cluster name.
- Start Elasticsearch.
Install jCustomer and create a properties file that specifies your Elasticsearch cluster name.
To install jCustomer:
- Download and unzip jCustomer 1.4.1 here or login to the Customer Center to access the download.
- After unzipping, navigate to the
- Create a new .properties file and name it
- Add the following entry to the file:
<yourClusterName>is the cluster name that you specified for Elasticsearch earlier. For example:
- Save the file.
- (Optional) jCustomer requires an IP database to resolve IP addresses to the user location. The GeoLite2 database can be downloaded from MaxMind here: http://dev.maxmind.com/geoip/geoip2/geolite2/
Simply download the GeoLite2-City.mmdb file into the
- (Optional) jCustomer includes a geocoding service based on the Geonames database that is used to create conditions on countries or cities.
Get the allCountries.zip database from here: allCountries.zip. Download it and put it in the
etcdirectory without unzipping it. The import can take about 15 minutes and runs in the background.
- Start jCustomer using the following command.
- On the first start, you also must execute the following command.
- 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.
- 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.
To enable jExperience modules:
- Open your Jahia Enterprise Distribution instance, and navigate to Administration>System components>Modules.
- Click on Available modules and type
jExperiencein the Search module by keyword field.
- Select the jExperience module and click Download.
- Once the download completes, select Installed modules, locate the jExperience module. The status should be
- 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:
- In your Jahia installation folder, navigate to the
digital-factory-data/karaf/etcsubfolder. For example, navigate to:
- Create a new .cfg file named
org.jahia.modules.jexperience.settings-global.cfg. Either create a file from scratch or download this sample file.
- Edit the following properties (or copy-paste the text below):
# Mandatory connection properties are: jexperience.jCustomerURL=https://localhost:9443 jexperience.jCustomerPassword=karaf jexperience.jCustomerUsername=karaf # Optional properties and there default value: # Trust all certificate jexperience.jCustomerTrustAllCertificates=true # Use public addresses for admin jexperience.jCustomerUsePublicAddressesForAdmin=false # Unomi KEY jexperience.jCustomerKey=670c26d1cc413346c3b2fd9ce65dab41
The configuration reloads without restarting the Jahia server.
- In the same folder, find and remove any other files starting with org.jahia.modules.jexperience.settings.
- To verify that the connection is working:
- Go to Jahia>Edit Mode on any site where jExperience is enabled. Then select Site settings>Manage connection to jCustomer.
- Verify that the jCustomer Status: ONLINE.