• Home
  • |
  • Blog
  • |
  • Step-by-Step Guide to Install Apache OFBiz on Linux
Guide to Install Apache OFBiz on Linux

Apache OFBiz is a feature-rich open-source enterprise resource planning (ERP) system. It provides a suite of business applications out of the box to manage tasks like accounting, inventory control, order fulfillment, warehouse management, CRM, e-commerce, and more within one unified system.

OFBiz is written in Java and can be deployed on-premises or in the cloud. It supports various databases like MySQL, MariaDB, PostgreSQL, Oracle, MS SQL Server, and H2.

In this comprehensive tutorial, we will go through installing the latest version of Apache OFBiz 17.12.06 from scratch on an Ubuntu 20.04 Linux server.

We will set up all the prerequisites like Java and MySQL servers. Then download, configure and launch OFBiz along with setting up the database. Finally, we will log into the application using the default credentials and you will have OFBiz ready for testing out its various modules.

So let’s get started with installing this feature-rich open-source ERP on Linux.


The installation has two key prerequisites – Java Development Kit (JDK) 8+ and Git. (We will use OpenJDK 11 in this guide.)

First, verify if Java is already installed:

java -version
A screenshot of a terminal window on an Ubuntu system displaying the output of the 'java -version' command, which shows that OpenJDK version '11.0.21' is installed.

If Java is missing or lower than 8, refer to these tutorials to install Java 8 on Ubuntu/Debian/Mint or RHEL/CentOS systems.

Next, install Git if it’s not present:

sudo apt install git
A screenshot of a terminal window on an Ubuntu system with the output of the 'git --version' command, showing that Git version '2.34.1' is installed.

Now we are ready to proceed with the the Apache Open For Business Project installation.

Step 1 – Download Apache OFBiz

We will install Apache OFBiz 18.12.11, the latest stable version at the time of writing. Download and extract the release archive using wget and unzip:

wget https://dlcdn.apache.org/ofbiz/apache-ofbiz-18.12.11.zip
unzip apache-ofbiz-18.12.11.zip
mv apache-ofbiz-18.12.11 /opt/ofbiz
cd /opt/ofbiz

This will place the extracted OFBiz directory at /opt/ofbiz.

A screenshot of a terminal window on an Ubuntu system showing a series of commands. The user attempts to move the 'apache-ofbiz-18.12.11' directory, faces a permission denied error, then successfully moves it using 'sudo'. The 'ls' command lists the contents of the '/opt/ofbiz/' directory, showing various files and directories associated with Apache OFBiz.

Step 2 – Initialize Gradle and Load Data

OFBiz uses the Gradle build system. Navigate to the installation directory and initialize the Gradle wrapper:

sh gradle/init-gradle-wrapper.sh
A screenshot of a terminal window on an Ubuntu system showing the execution of a script 'sh gradle/init-gradle-wrapper.sh'. The output indicates that 'gradle-wrapper.jar' was not found and was downloaded, along with 'gradle-wrapper.properties'. Both files are checked and confirmed with 'OK' status.

This downloads the gradle-wrapper.jar file into gradle/wrapper.

Now clean the existing data and load fresh OFBiz datasets:

./gradlew cleanAll loadAll

This will take a few minutes to complete. Wait until it gets completed.

A screenshot of a terminal window on an Ubuntu system showing the execution of Gradle tasks within the Apache OFBiz directory. The output includes the welcome message for Gradle 5.0-rc-5 and a list of tasks being executed, such as 'cleanCatalina', 'cleanData', and 'cleanAll', indicating the cleaning of various data and log directories.
A screenshot of a terminal window on an Ubuntu system showing the log output from loading data into Apache OFBiz. Timestamps, log levels, and messages such as 'Started container', 'Stopping container', and 'JobPoller shutdown completed' are displayed. The process ends with 'BUILD SUCCESSFUL' and a summary of 23 actionable tasks, 5 up-to-date.

Step 4 – Start Apache OFBiz

With the configuration complete, start the OFBiz server:

./gradlew ofbiz
A screenshot of a terminal window on an Ubuntu system showing the execution of the './gradlew ofbiz' command. The output lists various Gradle tasks for compiling Java, processing resources, and assembling up-to-date checks, all marked 'UP-TO-DATE'. The process proceeds with starting Apache OFBiz, loading configuration files, and containers, along with warnings about illegal reflective access operations.

Wait until the console displays Started in X seconds. indicating a successful start.

A screenshot of a terminal window on an Ubuntu system displaying logs from the Apache OFBiz application. The logs include timestamps, log levels, and messages indicating various operations like 'Sync service', 'RequestHandler', and 'Transaction rolled back'. Some operations are successful while others show warnings or errors related to system services and transactions.

Step 5 – Access Apache OFBiz

You can now access the OFBiz interface at:

A screenshot displaying the login screen of Apache OFBiz on a web browser with the URL 'localhost:8443/myportal/control/main'. The login form is titled 'Registered User' and includes fields for 'User Name' and 'Password', with a 'Login' button and links for 'Forgot Your Password?' and 'New Registration'.

Log in with username as admin and password as ofbiz.

A screenshot of the Apache OFBiz application user interface in a web browser, showing the My Portal section. The interface includes navigation tabs like 'Party', 'HR', 'Marketing', and 'Web Tools'. The main panel displays system info notes for the user 'admin', task assignments, system info status, and a weekly calendar view.

That completes the installation! You now have a working instance of Apache OFBiz on Linux.

Bottom Line

In this detailed guide, you successfully installed the latest Apache OFBiz 18.12.05 from scratch on an Ubuntu 20.04 Linux system.

We started by verifying the installation prerequisites – Java 8+ and Git. Then downloaded the OFBiz archive, extracted it and initialized the Gradle build system.

Next, we loaded the default OFBiz data and seeded the demo data for testing purposes. Finally, the application server was started and accessed through the browser at port 8443.

See Also  Breaking Down the Latest September 2023 Patch Tuesday Report

You now have a working OFBiz instance with various enterprise-level applications ready to meet business needs like:

  • Accounting: Financial/cost accounting, invoicing, payment processing, taxation and more.
  • Inventory Management: Warehouse, stock control, product catalog and inventory accounting.
  • Order Management: Shopfront, shopping cart, order creation, processing, fulfillment and tracking.
  • CRM: Accounts, contacts, leads, opportunities, cases, activities, commissions and associate portals.
  • HR Management: Organizational model, positions, employees, hiring, attendance/timesheets, payroll, benefits and retirement.
  • Manufacturing: Bills of materials, work orders, workflows, manufacturing runs, quality control and production planning.

Additionally, OFBiz offers an extensible framework to build custom modules, integrate with external systems and customize business processes to your exact specifications.

So go ahead and explore the various pre-built applications. Or start developing tailored solutions leveraging the flexible architecture of this powerful open source ERP suite.

The full documentation is available at OFBiz Wiki to help you on your journey.

Let us know in the comments if you have any issues getting Apache OFBiz running on your system.

We hope this post helps learning how to install Apache OFBiz on a Linux machine. Thanks for reading this tutorial post. Visit our website thesecmaster.com and social media page on FacebookLinkedInTwitterTelegramTumblr, Medium & Instagram, and subscribe to receive updates like this.

Read More:

About the author

Arun KL

Arun KL is a cybersecurity professional with 15+ years of experience spanning IT infrastructure, cloud security, vulnerability management, Penetration Testing, security operations, and incident response. He is adept at designing and implementing robust security solutions to safeguard systems and data. Arun holds multiple industry certifications including CCNA, CCNA Security, RHCE, CEH, and AWS Security.

To know more about him, you can visit his profile on LinkedIn.

Leave a Reply

Your email address will not be published. Required fields are marked

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Learn Something New with Free Email subscription

Email is also one of the ways to be in touch with us. Our free subscription plan offers you to receive post updates straight to your inbox.