Deploy and Host your OpenCRX with Jelastic

By September 17, 2015 Guest Post No Comments
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone


OpenCRX is an open source customer relationship management (CRM) solution, that helps clients in generating higher ROI, enlarging sales and improving customers services. Chief features of this software are:

  • role-based security
  • high-level platform independence
  • virtually unlimited scalability
  • easy installation
  • service is deployable to all major platforms

Below you can find a detailed instruction how to easily set up openCRX on Jelastic PaaS.

This article was originally posted by our customer who hosts this application on Flow App Engine hosting partner.

Create Environment

Launch the Jelastic administration console (you must be registered on one of the Jelastic web hosting providers) and create a new JAVA environment with the following topology:

  • Apache 2.2 as frontend (we did not test Nginx, but it should work as well)
  • TomEE 1.7 as application server
  • PostgreSQL as database (you can migrate to another supported database later on at any time. For more information see here)


After building the environment the layout should look as follows:


Configure Database

  1. As a next step, we have to create a new database. You need to log in to the PostgreSQL administration console and create a new database instance as shown below.


  1. The following fields are mandatory and must be set as follows:
  • Name: CRX (default database name of openCRX)
  • Template: template0 (this template allows to set the collation to C)
  • Encoding: UTF-8 (openCRX supports UTF-8 encoding only)
  • Collation: C (allows ordering as required by openCRX. For more information see here)
  1. After the database is created we have to create the bootstrap database schema. This schema contains only a minimal set of tables required to start openCRX and log in as Root administrator. Select the database CRX and click on the SQL button to launch the SQL script window. Get the created schema script from here and upload it to the SQL script window by clicking on the Choose File button. Click the Execute button.


The script should run without errors as shown below:


Configure TomEE Server with Application

  1. Next we have to prepare TomEE 1.7. Click on the Config button of the TomEE node as shown below:


  1. Select the apps directory and click on the Upload button. Upload the file opencrx-core-CRX.ear. You can get the file from an existing openCRX server installation. It is located in the directory ./apache-tomee-webprofile-1.7.1/apps/


  1. Switch to the lib directory and upload the following files:
  • catalina-openmdx.jar
    You can get the file from an existing openCRX server installation. It is located in the directory ./apache-tomee-webprofile-1.7.1/lib/
  • postgresql-9.4-1202.jdbc4.jar
    You should download the latest JDBC driver for PostgreSQL from here.


  1. Go to server directory and open the file variables.conf. Paste the following text:
   # BEGIN openCRX
    # -Dorg.opencrx.usesendmail.CRX=false
    # -Dorg.openmdx.persistence.jdbc.useLikeForOidMatching=false
    # -Djavax.jdo.option.TransactionIsolationLevel=read-committed
    # END openCRX
  1. In a next step, we have to configure TomEE so that it can access the database. Open the file tomee.xml and paste the following text:
 <?xml version="1.0" encoding="UTF-8"?>
     <!-- see -->

     <!-- openCRX/PostgreSQL -->
     <Resource id="jdbc_opencrx_CRX" type="DataSource">
       JdbcDriver org.postgresql.Driver
       JdbcUrl jdbc:postgresql://{{pg env and host name}}/CRX
       UserName {{pg username}}
       Password {{pg password}}
       JtaManaged true
       RemoveAbandoned true
       RemoveAbandonedTimeout 10
       LogAbandoned true
       MaxWait 100

     <!-- activate next line to be able to deploy applications in apps -->
     <Deployments dir="apps" />


Make sure that you replace placeholders {{pg env and host name}}, {{pg username}}, {{pg password}} with the proper settings from your Jelastic environment.

  1. Now open tomcat-users.xml and paste the text below. This allows us to log in as user admin-Root.
   <?xml version='1.0' encoding='utf-8'?>
      <role rolename="OpenCrxUser"/>
      <role rolename="OpenCrxRoot"/>
      <role rolename="OpenCrxAdministrator"/>  
      <user username="admin-Root" password="manager99" roles="OpenCrxRoot,OpenCrxAdministrator"/>


  1. Last we have to modify server.xml as shown below. We have to add the option URIEncoding=”UTF-8″ for the connectors AJP/1.3 and HTTP/1.1. This guarantees proper URL encoding for all UTF-8 characters:
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" />
    <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="443" URIEncoding="UTF-8" />


  1. Now restart the TomEE node as shown below:


  1. Switch to the logs by clicking the Log icon and select the log file catalina. This shows the startup progress of TomEE and openCRX:


  1. Now click on the Open in browser icon:


This connects the TomEE with the root URL. Append opencrx-core-CRX to the URL in the browser address bar. This brings up the login screen of openCRX:


So, finally you have a running (empty) openCRX instance. Follow the instructions of the upgrade guide in order to complete the installation of openCRX:

  • Launch and run the database schema wizard
  • Load the code tables
  • Create and setup the segment ‘Standard’


Jelastic team is happy to share this awesome customer`s experience article, which will help you to easily set up your OpenCRX on Jelastic in just several clicks. Go ahead and test it by yourself – simply sign up for a 2-week-free-trial and share your experience in the comments below.

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

Leave a Reply

Subscribe to get the latest updates