Skip to main content

OpenWes Installation Guide

Follow these steps to install and set up OpenWes on your system. OpenWes is designed to be easy to deploy, whether you're running it locally for development or in a cloud environment for production.

Prerequisites

  • Java (17+): For running the backend server applications.
  • MySQL (8.0+): Used as the relational database for storing warehouse data.
  • Nacos (2.0+): A service registry and configuration management tool.
  • Redis (7.0+): Used for caching and session management.
  • Node.js(18+): For running the client application.

Mysql, Nacos and Redis should be installed on the same machine. You can use docker-compose file to install all the middlewares like mysql, nacos and redis with docker-compose.

Steps

1. Clone the repository:

git clone https://github.com/jingsewu/open-wes.git

2. Set Up the Backend Servers

2.1 Add Nacos Configuration
Execute the script to load the Nacos configuration into the MySQL database:

mysql -u root -p nacos_config < server/script/nacos_config.sql

2.2: Configure the Hostname

Edit your system’s hosts file to map the Nacos hostname (nacos.openwes.com) to 127.0.0.1:

  • Linux: /etc/hosts
  • Windows: C:\Windows\System32\drivers\etc\hosts
    Add the following line to the file:

172.0.0.1 nacos.openwes.com

2.3: Create the OpenWes Database Log into MySQL and create the openwes database:

  create database openwes;

2.4: Start the Backend Servers Navigate to the server/server directory and start the backend servers:

  • WesApplication
  • GatewayApplication
  • StationApplication You can use an IDE (like IntelliJ or Eclipse) or the following command:
java -jar WesApplication.jar
java -jar GatewayApplication.jar
java -jar StationApplication.jar

3. Set Up the Client

3.1: Update Webpack Configuration Rename the Webpack configuration file for development:

mv client/build/webpack.config.example.dev.js client/build/webpack.config.dev.js

3.2: Install Dependencies for the Client Navigate to the client directory and install the required dependencies:

cd client
npm install

3.3: Start the Client Run the client application:

npm start

The client will be available on http://localhost:4001 by default.

Troubleshooting If you encounter any issues during the installation, check the following:

  • Missing dependencies: Ensure that all required software (Java, MySQL, Nacos, Redis, Node.js) is installed and configured correctly.
  • Host file issues: Make sure that nacos.openwes.com points to the correct IP address (127.0.0.1).
  • Database issues: Ensure that the openwes database was created successfully in MySQL.
    For further assistance, consult the OpenWes Community or create an issue in the GitHub repository.