April 7, 2023

Step-by-step guide – Installing MuleSoft on Windows Server

While it’s common trend on moving to cloud and building new applications in Kubernetes based environments like CloudHub2 , Runtime Fabric there are still many clients using Hybrid Deployment model and some of them use Microsoft Windows as their core infrastructure.

This article will guide you on how to install MuleSoft Runtime v4 on Microsoft Windows Server.

Prerequisites

Hardware/software requirements: https://docs.mulesoft.com/mule-runtime/4.4/hardware-and-software-requirements

Network accesses:

https://docs.mulesoft.com/runtime-manager/rtm-agent-allowlists
https://docs.mulesoft.com/runtime-fabric/2.1/install-self-managed-network-configuration

EUhttp://eu1.anypoint.mulesoft.com443
EUmule-manager.eu1.anypoint.mulesoft.com443
EUruntime-manager.eu1.anypoint.mulesoft.com443
EUanalytics-ingest.eu1.anypoint.mulesoft.com443
EUarm-auth-proxy.prod-eu.msap.io443
EUdata-authenticator.eu1.anypoint.mulesoft.com443
EUexchange2-asset-manager-kprod-eu.s3.eu-central-1.amazonaws.com443
EUdias-ingestor-router.eu-central-1.prod-eu.msap.io443

Installing Java

Download the supported by Mule version of Java from https://adoptium.net/temurin/releases/ . You can check the supported by Mule version of Java on https://docs.mulesoft.com/mule-runtime/4.4/hardware-and-software-requirements

The version of Java that is being installed at the time of writing this article: OpenJDK11U-jdk_x64_windows_hotspot_11.0.18_10.zip

  1. Extract the distributive to the installation path on a new server (for example, “C:\opt\java”)
    1. Environment variables
  2. Add the environment variables:
    1. Click Win+R button
    2. Write “sysdm.cpl“ and click Enter
    3. Go to “Advanced“ tab
    4. Click the “Environment variables“
      • Add the new JAVA_HOME
    5. Add the new “JAVA_HOME” environment variable with your path (for example, “C:\opt\java\jdk-11.0.18+10“)
      • Add the new value %JAVA_HOME%\bin
    6. Add the new value “%JAVA_HOME%\bin“ in the “Path“ variable:
  3. Check that Java was installed in cmd or PowerShell console (reopen PowerShell console if it was open when you add the environment variables)
    • java -version

Installing Mule

Download the actual version of MuleSoft Runtime from https://help.mulesoft.com/s/downloads (need login).

The version of MuleSoft that is being installed at the time of writing this article:

NameVersionRelease Date
mule-ee-distribution-standalone-4.4.0- 20230223.zip4.4.0-February-2023-Update02-24- 2023
  1. Extract the distributive to the installation path on a new server (for example, “C:\opt\mule”)
  2. Run PowerShell as an administrator
  3. Install Mule (for more information visit https://docs.mulesoft.com/mule-runtime/4.4/runtime-installation-task )
    1. Define $MULE_HOME environment variable:
      • $env:MULE_HOME=“C:\opt\mule” 
    2. Install Mule:
      • & "$env:MULE_HOME\bin\mule.bat" install 
  4. Install an Enterprise License (for more information visit https://docs.mulesoft.com/mule-runtime/4.4/installing-an-enterprise-license )
    1. Download “license.lic“ form Mule Support portal
    2. Copy “license.lic“ to “$MULE_HOME\bin” folder
    3. Delete old “muleLicenseKey.lic” in “$MULE_HOME\conf” folder (if exists):
      • rm $env:MULE_HOME\conf\muleLicenseKey.lic
    4. Install the license:
      • & "$env:MULE_HOME\bin\mule.bat" -installLicense "$env: MULE_HOME\bin\license.lic"
    5. Verify the license:
      • & "$env:MULE_HOME\bin\mule.bat" -verifyLicense
  5. Enable TLSv1
    1. in $MULE_HOME/conf/tls-default.conf, add TLSv1 on the enabledProtocols setting
    2. enabledProtocols=TLSv1,TLSv1.1,TLSv1.2
  6. Start Mule (for more information visit https://docs.mulesoft.com/mule-runtime/4.4/starting-and-stopping-mule-esb)
    • & "$env:MULE_HOME\bin\mule.bat" start
  7. Add the server to Anypoint Runtime Manager (for more information visit https://docs.mulesoft.com/runtime-manager/servers-create)
    1. From Anypoint Platform, select Runtime Manager.
    2. Choose the environment for the server
    3. Click Servers in the left menu.
    4. Click the Add Server button.
    5. Enter a name for your server.
    6. Click Copy command
    7. Go to “$MULE_HOME\bin\“
      • cd $env:MULE_HOME\bin\
    8. Run the Command
    9. Restart the Mule service (or reboot the server)
      • & "$env:MULE_HOME\bin\mule.bat" restart
  8. Add the server to Anypoint Monitoring (for more information visit https://docs.mulesoft.com/monitoring/am-installing)
    1. From Anypoint Platform, select Monitoring.
    2. In the Anypoint Monitoring navigation menu, click Settings.
    3. To install Anypoint Monitoring to monitor applications deployed to a local server, select Hybrid.
    4. Select the new server to deploy Anypoint Monitoring
    5. Download the am.zip
    6. Extract the zip file to your Mule home directory on the new server, which will create a new folder called am
    7. cd into the am folder and run the installation
      • cd $env:MULE_HOME\am\ .\bin\install.ps1
      • The script will ask you “Do you want to use monitoring as a service? [y|n]”. Type “y“ and press Enter
    8. Restart the Mule service (or reboot the server)
      • & "$env:MULE_HOME\bin\mule.bat" restart
    9. cd into am folder again and run
      • cd $env:MULE_HOME\am\ .\bin\setup.ps1
    10. In 5 minutes, you should see metrics appear in Anypoint Monitoring
  9. (ONLY FOR PRODUCTION) Add servers to cluster:

Additional inks:

https://help.mulesoft.com/s/article/How-to-set-CPU-affinity-for-a-Mule-ESB-process-in-Windows-as-a-Service

https://help.mulesoft.com/s/article/Start-Runtime-on-Windows-Fails-With-The-Mule-Enterprise-Edition-service-is-not-installed

https://docs.mulesoft.com/mule-runtime/4.4/runtime-installation-task

Get in touch
  • Business Center 1, M Floor, Meydan, Nad Al Sheba, Dubai, United Arab Emirates
    +971 800 0320341