DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
Table of contents
Introduction
This document describes an initial setup process and basic configuration options for Apache OFBiz. For more detail see related documents such as the Framework Configuration Guide, the Entity Engine Configuration Guide, the Service Engine Configuration Guide, and other related documents you may find at Documentation.
If you run into trouble there are various resources available to help. The first steps would be to search on the New OFBiz Docs Site, and then on the OFBiz Mailing Lists. If you can't find your answer there, subscribe to the Apache OFBiz Users Mailing List and send a message with as much detail as possible about the problem you are having.
Quick & Easy Setup
There are 2 ways to get OFBiz running quickly:
- Download an OFBiz release
- Check out from the Git repository (see below for more)
For more options and explanations, see the rest of this document.
- Install a JDK — OFBiz requires Java 17 (see System Requirements for the exact minimum for your version). OpenJDK is fully supported.
- Make sure your
JAVA_HOMEenvironment variable is set to this JDK after installation. - Check out or download OFBiz into the directory of your choice. This creates one sub-directory,
ofbiz— this will be yourOFBIZ_HOME. - (Not needed for pre-loaded snapshots) Load OFBiz demo data by running
gradlew loadAllon Windows or./gradlew loadAllon Linux/Unix/macOS. This loads into the embedded database — Apache Derby on release24.09 and earlier, H2 on trunk. - Start OFBiz with the embedded Tomcat by going into the ofbiz directory and running:
- Windows:
gradlew ofbiz(or%JAVA_HOME%\bin\java -jar build\libs\ofbiz.jar) - Linux/Unix/macOS:
./gradlew ofbiz(or$JAVA_HOME/bin/java -jar build/libs/ofbiz.jar)
- Windows:
- Open a browser and go to:
https://localhost:8443/ecommerceorhttps://localhost:8443/ecomseofor the ecommerce application (note: these live in the separatepluginsrepository/checkout, not the mainofbiz-frameworkrepo)https://localhost:8443/webtoolsfor the WebTools applicationhttps://localhost:8443/catalogfor the Catalog Manager application
- The default administrative account is username
admin, passwordofbiz. - For more detailed options and configuration information, read on.
Building OFBiz
When building from a release or a Git checkout, you'll use Gradle — sufficient Gradle libraries (notably the gradlew wrapper) and scripts are embedded with OFBiz.
In the directory where you want OFBiz to be, clone the framework repository (release branches are also available):
git clone https://github.com/apache/ofbiz-framework.git ofbiz
If you want optional applications like ecommerce (referenced in Quick & Easy Setup above), also clone the plugins repository into a plugins subdirectory of your ofbiz checkout:
cd ofbiz git clone https://github.com/apache/ofbiz-plugins.git plugins
Now go into the ofbiz directory (if you aren't already there) and run gradlew (Windows) or ./gradlew (Linux/Unix/macOS). It will compile all modules — including any plugins you've checked out — and leave you an executable jar (ofbiz.jar) in the ofbiz/build/libs directory.
About Gradle
On *nix platforms, you need to add ./ ahead of gradlew to use the embedded Gradle wrapper. You can use your own Gradle installation, but that's out of scope for this page.
To start the server, run gradlew ofbiz.
Another useful build option is gradlew clean (Windows) or ./gradlew clean (Linux/Unix/macOS), which cleans out all built classes so you can run gradlew again for a clean build. If you run into unexplained errors after pulling the latest changes, try a clean build first.
You can see the available Gradle tasks using gradlew tasks (Windows) or ./gradlew tasks (Linux/Unix/macOS).
Database Setup
Database setup is done in the entityengine.xml file. There are many options there, described in the Entity Engine Configuration Guide.
OFBiz ships with an embedded Java database — Apache Derby on release24.09 and earlier, H2 on trunk. This is good for demonstration purposes because it's easy to set up and use. It isn't the best choice for large data sets and doesn't provide the performance or scalability of a major database, but it's a solid starting point, and smaller sites may even consider it viable for production once stabilized.
There are many open source databases that scale well and deliver good performance — the two most popular are PostgreSQL and MySQL. PostgreSQL is a very full-featured database with transaction support, foreign keys, stored procedures, etc., and has friendly license terms. MySQL is dual-licensed (GPL and commercial) by Oracle, which owns MySQL today.
Commercial databases are also supported — OFBiz has been tested with Oracle, DB2, Sybase, MS SQL Server and others, and should work with any database that has a JDBC driver.
There's no need to run any SQL scripts to create or populate tables — the entity engine creates missing tables/fields on startup, when the appropriate property is set in entityengine.xml.
For the table creation routine to work, the field types must be set up by specifying the corresponding fieldtypeXXX.xml file (where XXX is the database name) in entityengine.xml. These files live in the framework/entity/fieldtype directory.
Default data can be loaded through the loadAll Gradle target, as mentioned above.
J2EE Containers
OFBiz comes and runs by default with Tomcat for a Servlet/JSP container, the Apache Geronimo Transaction Manager for a transaction (JTA) manager, and Apache DBCP for a transaction-aware connection pool.
2 Comments
Will Fong
Nov 11, 2011I hope this section about MySQL doesn't deter people from considering it: "Please note that if you use this in a commercial production instance you may have to purchase a commercial license because it is GPL licensed and so is the JDBC driver."
Licensing generally applies to distribution of software, not necessarily usage even in a commercial environment.
These links should help:
http://www.mysql.com/about/legal/licensing//commercial-license.html http://www.mysql.com/about/legal/licensing/oem/ http://www.mysql.com/about/legal/licensing/foss-exception/ http://www.gnu.org/licenses/gpl-faq.html
Thanks,
-w
Jacques Le Roux
Nov 18, 2013If ever you want to use MySQL, be sure to not use a version before 5.6.4, there was a well known timestamp issue