Thursday, March 21, 2024

How to Install OpenBoxes CMS on Ubuntu (Open Source Inventory Tool)


 Managing inventory and supply chain operations efficiently is crucial for the success of any business. OpenBoxes, an open-source inventory and supply chain management tool, offers a comprehensive solution to streamline resource tracking and management. In this guide, tailored for developers, we'll walk you through the step-by-step process of setting up OpenBoxes on Ubuntu 22.04. Utilizing modern commands and tools, this installation ensures an optimized environment for deploying OpenBoxes.

Prerequisites

Before getting started, make sure your system meets the following requirements:

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

Step 1: Update Your System

Begin by updating your system's package index and upgrading the existing packages to their latest versions. Execute the following command:

sudo apt update && sudo apt upgrade -y

Step 2: Install Java with SDKMAN!

OpenBoxes requires Java 7 for its operation. We'll use SDKMAN! for easy management of Java versions. Follow these steps to install SDKMAN! and Java 7:

curl -s "https://get.sdkman.io" | bash

source "$HOME/.sdkman/bin/sdkman-init.sh"

To ensure SDKMAN! environment initialization in future sessions, use:

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

Now, install Java 7:

sdk install java 7.0.312-zulu

Step 3: Install MySQL

MySQL serves as the database backend for OpenBoxes. Install MySQL server using the following command:

sudo apt install mysql-server -y

Secure your MySQL installation with:

sudo mysql_secure_installation

Next, login to MySQL shell and execute the following SQL statements to create the OpenBoxes database and user:

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

Create the OpenBoxes configuration file in the root directory:

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

In this file, specify your database settings and other configurations. Refer to the official OpenBoxes documentation for detailed instructions. Set environment variables for the 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

Using SDKMAN!, install Grails version 1.3.9, which is required by OpenBoxes:

sdk install grails 1.3.9

Step 6: Clone and Set Up OpenBoxes

Clone the OpenBoxes repository from GitHub and navigate to the project directory:

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

cd openboxes

Ensure you're using Node.js version 14, and install necessary npm packages:

nvm install 14

nvm use 14

npm install

npm run bundle

Step 7: Run OpenBoxes

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

grails run-app

Conclusion

Congratulations! You have successfully installed OpenBoxes on Ubuntu 22.04 using a modern development stack. This guide has provided a comprehensive walkthrough, from setting up the environment to deploying the OpenBoxes application. Explore the robust features of OpenBoxes and optimize your inventory and supply chain management processes effortlessly.

0 comments:

Post a Comment