Skip to Main Content

Step-by-step installation of WSO2 API Microgateway: Prerequisites

What is WSO2 API Microgateway?

WSO2 API Microgateway is an open source processor that can be used by organizations to make sure that their messages follow a path without risk, guaranteeing an adequate routing and transport. All the services that it provides in relation to them are linked to an improvement in the quality of the API management services.

This proxy is essential to manage the new digital transformation model, where the work is performed by independent, highly-specialized teams, each of which is in charge of independent microservices. Thanks to its features, WSO2 API Microgateway facilitates the development of workflows and increases their efficiency. Below we will see how to install this proxy, step by step.

WSO2 API Microgateway installation prerequisites

The following prerequisites for WSO2 Microgateway Toolkit and WSO2 Microgateway Runtime must be met for an adequate installation of WSO2 API Microgateway.

WSO2 Microgateway Toolkit

  1.  Make sure that your system meets the following basic requirements: JDK development environment with Open JDK 1.8 (e.g., AdoptOpenJDK 8, OpenJDK 8) and JAVA_HOME configuration based on your operating system.
  1.  JAVA_HOME configuration based on the operating system. From this point on, you need to follow the following configuration steps depending on whether the operating system is Linux, MacOS or Windows.

JAVA_HOME configuration for Linux/Mac OS

You must configure your JAVA_HOME environment variable so that it points to the directory where the Java Development Kit (JDK) is installed in the computer. Environment variables are global system variables that are accessible to all processes that run under the operating system. In the starting directory, open the bashrc file (file.bash_profile in Mac) using editors such as vi, emacs, pico or mcedit. Assuming that you have JDK 1.8.0_171 on your system, add the following two lines at the bottom of the file, replacing /usr/java/jdk1.8.0_171 with the real directory where JDK is installed.

On Linux:

export JAVA_HOME=/usr/java/jdk1.8.0_171

export PATH=${JAVA_HOME}/bin:${PATH}

On OS X:

export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.8.0.jdk/Contents/Home

Save the file.

If you don’t know how to work with text editors on a Linux SSH session, run the following command: cat >>.bashrc. Paste the string from the clipboard and press “Ctrl+D”. In order to verify if the JAVA_HOME variable is correctly configured, run the following command:

The system returns the installation route of the JDK.

On Linux: echo $JAVA_HOME

On OS X: which java

If the command above returns a path such as /usr/bin/java, the it is a symbiotic link to the real location. In order to obtain the real location, run the following: Es -l `which java`

JAVA_HOME configuration for Windows

Configure the JAVA_HOME environment variable as a user variable through the UI edition properties.

  1.   Start a command line session.
  2.   Download the toolkit distribution of WSO2 API Microgateway.
  3.   Extract the storage file to a dedicated folder for the WSO2 API Microgateway Toolkit, which will from this point on be referred to as <MGW-TK_HOME>.
  4.   Add the full path of the /bin folder of the extracted distribution of the WSO2 API Microgateway Toolkit to the PATH environment variable. This will allow you to run the commands related to the WSO2 API Microgateway Toolkit from any directory location.

Microgateway Runtime

  1.   Make sure that your system fulfills with the following basic requirements: 256MB of memory, 2 cores and any of the operating systems.
  2.   Start a command line session.
  3.   Download the version of WSO2 API Microgateway for your operating system and extract it.
  4.   Extract the storage file to a dedicate directory for WSO2 API Microgateway Runtime, which will from this point on be referred to as <MGW_HOME>.
  5.   Add the full path to the /bin folder of the extracted distribution of WSO2 API Microgateway to the PATH environment variable. This allows you to execute that commands related to the WSO2 API Microgateway distribution from any directory location.

Linux and OS X

Example:

export PATH=$PATH:<extracted_distribution_location>/bin

Windows

Use one of the following methods to define the paths:

  • Set the path of the Microgateway toolkit distribution using the following terminal command. Example: setx “%path%;<extracted_distribution_location>/bin”
  • Set the Microgateway Runtime distribution path using the Windows user interface.

These are the required prerequisites for the installation of WSO2 Api Microgateway. These simple steps will help you with the installation. Don’t miss our following article, where we will explain the next installation step.