Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updates keystore and password locations

...

Info
titlePre Gradle version

This page documents the usage with Gradle, the pre-Gradle documentation is here: Apache OFBiz Technical Production Setup Guide

This page documents the trunk version, the documentation for the R16.11 version is here: Apache OFBiz Technical Production Setup Guide

NOTE: this is the technical setup guide for OFBiz, for the business oriented one, look here

...

  1. If you decide not to use the embedded Derby database, check/install your database of choice. See below for some information that may help with using or installing OFBiz with alternative databases

    Changing from Derby to MySQL Database
    OFBiz and Oracle
    Connecting OFBiz to PostGIS spatially enabled database
    Switching from a Derby database to another

  2. If necessary, put the correct JDBC driver in the following directory:

    1. ${ofbiz install dir}/framework/entity/lib/jdbc (NOTE: download the last mySQL jdbc driver)
    2. Replace the old or incorrect version of the driver (i.e. copy in with same name to avoid problems with update restoring the old driver later)

  3. To setup the Entity Engine to use a different database from the default Derby database.
    In the: ${ofbiz install dir}/framework/entity/config/entityengine.xml file:
    •  Modify the "localpostgres" (or  "localmysql", etc.) datasources elements to connect to your database.
    •  Modify the "default" delegator element:

          Change
              <group-map group-name="org.apache.ofbiz" datasource-name="localpostgreslocalderby"/>
          to
              <group-map group-name="org.apache.ofbiz" datasource-name="localpostgreslocalpostgres"/>

    •     The OLAP and Tenant data sources will still use Derby. If you want to change those to use PostgreSQL also, then:

      • Modify the "localpostgresolap" datasource element to connect to your OLAP database.

      • Modify the "localpostgrestenant" datasource element to connect to your Tenant database.

    • Modify the "default" delegator element:

          Change
              <group-map group-name="org.apache.ofbiz.olap" datasource-name="localderbyolap"/>
          to
              <group-map group-name="org.apache.ofbiz.olap" datasource-name="localpostgresolap"/>
          Change
              <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localderbytenant"/>
          to
              <group-map group-name="org.apache.ofbiz.tenant" datasource-name="localpostgrestenant"/>

    • Modify an existing datasource (near the bottom of the file) or create a new one by copying one of the sample datasources already there and giving it a new unique name

...

Run one of the following two options from the command line in the ofbiz home directory to run the default install routine:

Code Block
 [./]gradlew loadDefaultloadAll (add "./" on *nix systems, to use the embedded Gradle which comes with its wrapper, hence gradlew and not gradle in the command). 
Do this from the ofbiz home directory (i.e. the directory where you installed OFBiz). Note: you can get more information about Gradle task using "gradlew tasks".
or

...

Code Block

java -jar build/libs/ofbiz.jar --load-data

Help can be obtained by by the following command:

Code Block
gradlew "ofbiz -help"
or
java -jar build/libs/ofbiz.jar ?

Note that you can choose to only load the basic "seed" data and not load the "demo" set of data files. To do this run something like:

Code Block
 java -gradlew "ofbiz --load-data readers=seed,seed-initial"
or
java -jar build/libs/ofbiz.jar --load-data readers=seed,seed-initial

...

To load the "seed" and "ext" groups run something like:

Code Block
gradlew "ofbiz --load-data readers=seed,ext"
or
java -jar build/libs/ofbiz.jar --load-data readers=seed,ext

...

Info

Log4J is the engine used by OFBiz to manage its log output. The releases 13.07.*, 12.04.*, 11.04.*, 10.04.* use Log4J 1 (the configuration file is named log4j.xml) while newer releases are bundled with Log4j2 (the configuration file is named log4j2.xml).

For information about advanced configuration of Log4j refer to:

...


Security Settings

${ofbiz install dir}/framework/security/config/security.properties

...

The following configuration files contain port configurations that may configured for custom OFBiz installations.
You may also use the global portoffset Java properties. Use "gradlew "ofbiz ?" or "java -jar build/libs/ofbiz.jar -h" to know more about this option.

...

  • To ease development (Out Of The Box, OFBiz is configured in development mode) the compressHTML properties in general.properties if OFF. If you prefer to strip unnecessary whitespace from HTML output you can set it on ON (uncomment the line "#compress.HTML=true"). Note that , non html output screens like for example tab delimited exports can be then messed up. Note also that it is NOT the same thing as gzipped HTTP 1.1 compression.
  • For the same reason (development mode) the line "widget.verbose=true" is uncommented. If you do not want to see any informations about widget boundaries in the generated HTLM code, you should comment this line.

Ports, Default Values

  • Admin Port - 10523
    • Configured in: start.properties File
    • Referenced in: Config.java File
  • HTTP - HTTP - 8080
    • Configured in: ofbiz-containers XML File
    • Referenced in: Service Engine XML File, Client Browser (if running direct), URL Properties File
  • HTTPS - 8443
    • Configured in: ofbiz-containers XML File
    • Referenced in: Client Browser (if running direct)
  • AJP13 - 8009
    • Configured in: ofbiz-containers XML File
    • Referenced in: Apache mod_jk plugin configuration
  • JRMP (JNDI, RMI, etc) - 1099
    • Configured in: Carol Properties (carol.jrmp.url)
    • Referenced in: Containers XML File, JNDI Properties File, Service Engine XML File
  • BSH Client - 9989, 9990 (this should generally be disabled or at least protected by a firewall)
    • Configured in: ofbiz-containers XML File
  • Multicast ports - 45564, etc. (Tomcat clustering)
    • Configured in: ofbiz-containers XML File

...

"keytool -import -alias ssl -trustcacerts -file mysignedcert.cer -keystore [keystore name]"

6. Configure the the framework\catalina\ofbiz-containerscomponent.xml file to point to your new keystore and password:

...

If you are having trouble getting OFBiz to connect to your mail server, try disabling your anti-virus software (temporarily) as it may block attempts to send emails from unknown applications because it thinks they are being sent by a virus.

Another possible issue is the presence in database of SystemProperty data that could overload general.properties configuration. Be sure to check the absence of mail property in SystemProperty table.

Mounting a Root WebApp

It is often desirable to have one of the webapps mounted on the root. This is often either the ecommerce webapp or your own web site, which is created as a webapp in an OFBiz component would be setup the same way.

...

On the command line this can be as simple as (but beware you might need to pass specific JVM arguments, like "-server" if you develop on Windows, see

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyOFBIZ-7321
):

Code Block
 javagradlew ofbiz
or
java -jar build/libs/ofbiz.jar

or through Gradle:

Code Block
 gradlew ofbiz

To access the application from your browser follow advice given in the Demo and Test Setup Guide

...

To run all automated tests use the following command:

Code Block
 javagradlew testIntegration
or
java -jar build/libs/ofbiz.jar -t

To run just the tests for one component run something like (for the entity component):

Code Block
gradlew "ofbiz --test component=entity"
or
 java -jar build/libs/ofbiz.jar --test component=entity

...

Database Intensive Operations
The comments above on memory settings, caches, etc. are for category browsing pages and such where just about everything should be cached. For database intensive operations, like the product searching, it's much better to focus on how the database is managing with the queries.