OpenBoxes is a robust open-source inventory and supply chain management tool that can transform how businesses track and manage their resources. Tailored for developers looking to deploy OpenBoxes on Ubuntu 22.04, this guide takes you through a comprehensive setup process, incorporating newer commands and tools for an optimized installation.

Advertisement

Prerequisites

Ensure your system is ready by meeting the following requirements:

  • Ubuntu installed on your machine.
  • Sudo or root privileges.
  • Basic command-line proficiency.

Step 1: Update Your System

First, refresh your package index and upgrade the system packages to their latest versions with:

sudo apt update && sudo apt upgrade -y

Step 2: Install Java with SDKMAN!

OpenBoxes requires Java 7 for operation. We’ll use SDKMAN! to manage our Java versions easily. Install SDKMAN! by running:

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"

There may be a typo in the original instructions. To ensure the SDKMAN! environment is correctly initialized in future sessions, you should use:

source ~/.sdkman/bin/sdkman-init.sh

Now, install Java 7 using SDKMAN!:

sdk install java 7.0.312-zulu

Step 3: Install MySQL

OpenBoxes utilizes MySQL for its database. Install MySQL server with:

sudo apt install mysql-server -y

Secure your MySQL installation by running the following command.

sudo mysql_secure_installation

Login to MySQL shell and create the OpenBoxes database and user using following SQL statemetns:


CREATE DATABASE openboxes DEFAULT CHARSET utf8;
CREATE USER "openboxes"@"localhost" IDENTIFIED BY "password";
GRANT ALL ON openboxes.* TO "openboxes"@"localhost";
FLUSH PRIVILEGES;

Step 4: Configure OpenBoxes

Navigate to your root directory and create the OpenBoxes configuration file:

vim /root/.grails/openboxes-config.properties

In this file, you’ll need to specify your database settings among other configurations. Reference the official OpenBoxes documentation for detailed instructions.

Set environment variables for the OpenBoxes configuration location and Java home:

export OPENBOXES_CONFIG_LOCATION=/root/.grails/openboxes-config.properties
export JAVA_HOME=/usr/lib/jvm/zulu-7-amd64

Step 5: Install Grails

With SDKMAN!, installing Grails is straightforward. OpenBoxes requires Grails version 1.3.9:

sdk install grails 1.3.9

Step 6: Clone and Set Up OpenBoxes

Clone the OpenBoxes repository from GitHub:

git clone https://github.com/openboxes/openboxes.git
cd openboxes

Before proceeding, ensure you’re using the correct Node.js version. Install and use Node.js version 14:

nvm install 14
nvm use 14

Install the necessary npm packages and bundle your JavaScript files:

npm install
npm run bundle

Step 7: Run OpenBoxes

With all dependencies installed and configurations set, start the OpenBoxes application:

grails run-app

Your OpenBoxes instance should now be running on http://localhost:8080/openboxes.

Conclusion

You have successfully installed OpenBoxes on Ubuntu 22.04 using a modern development stack. This guide walks you through setting up your environment, from installing Java with SDKMAN! to deploying the OpenBoxes application. Enjoy the robust features of OpenBoxes for your inventory and supply chain management needs.

Share.
Leave A Reply


Exit mobile version