Access Keys:
Skip to content (Access Key - 0)


Installing Mule

This page describes how to install Mule ESB. Install the third-party software and set up your environment first, and then follow the installation instructions for the distribution type you are downloading.

If you just want to do the fastest possible install and setup, see Quick Start.

Distribution Types

There are three types of Mule distributions. The distribution you choose depends on your business needs and current phase of development.

  • MuleSoft supported release (Mule Enterprise): the latest, fully tested release of Mule created by MuleSoft that includes premium features not found in the community release. Mule Enterprise provides access to technical support, maintenance patches, and the MuleSoft knowledge base and is suitable for development, pre-production, and production environments alike. You can download and install the 30-day trial of Mule Enterprise here.
  • Latest stable community release: the latest stable community release of Mule. This distribution is suitable for development or pre-production environments. (Mule Enterprise is the best choice for production environments.) You can download the community release [here].
  • Snapshot release: the latest Mule distribution built against the very latest code base ("the bleeding edge"). Snapshot releases may be unstable, so they are intended for development environments only, not for production environments. Additionally, snapshot releases do not include any documentation. You can download the latest snapshot release [here].

You can also check out the source code and build Mule yourself. For complete information on how to check out the Mule source code from Subversion and build Mule, see [Setting Up the Development Environment] and [Building from Source].

Compatible Platforms

Users run Mule on many different operating systems with a variety of messaging platforms and application servers. The following table lists the platforms that members of the community have reported are compatible with Mule. If you have run Mule successfully with additional platforms, please let us know.

Technology Platforms
Operating Systems Windows XP SP2, Windows 2000, Windows 2003 Server (32-bit if using the Java Service Wrapper), Linux, Solaris, AIX, HP-UX, and Mac OSX
Application Servers Tomcat, JBoss, WebSphere, WebLogic, and Jetty
Messaging Any JMS vendor; users have reported integration via Active MQ, Open MQ, TIBCO EMS, TIBCO Rendezvous, Oracle AQ, and IBM WebSphere MQ
Java JDK 1.5 and 1.6

Installing Required Software

Before you install and run Mule, you must install the following software.

If you are using UNIX, log in as a non-root user before you proceed. This will ensure that your environment and Mule installation can support Mule HQ if you decide to install it later, as Mule HQ requires that you log in as a non-root user before you install it.


Install Java Developer Kit (JDK) 1.5. Note that JDK 1.4.x will work if you are not using the Mule IDE, CXF, or building Mule from the source code, but JDK 1.5.x is highly recommended. Run the installer, following the instructions that appear on the screen.

If you are using the Mule IDE, you must also endorse the JDK with a proper JAXP (Java API for XML Processing) implementation. To do this, download Apache Xerces and Xalan and drop the JARs into your JVM's jre/lib/endorsed directory. If that directory does not yet exist, create it.

Compression Tool

If you will be downloading one of the compressed Mule distributions, make sure you have a compression tool installed such as WinZip (Windows) or GZip (Linux/UNIX) to decompress the ZIP or TAR file.

Build Tool

You must also install the Mule IDE with Eclipse (recommended), Maven, or Ant, depending on which tool you want to use to build and run your projects.

Mule IDE

If you will install the Mule IDE, you install it after installing Mule--see Installing Mule IDE.


If you do not want to use the Mule IDE, or if you will be using the Maven archetypes to create a new transport or module, install Maven.

  1. Download the Maven distribution from the Maven web site and unpack it to any folder (for example, C:\Apache). Since there were some critical bugs in earlier versions, Maven 2.0.9 is recommended. If you are using a Macintosh, you must use Maven 2.0.9.
  2. Create a Maven repository directory with no spaces in the path, such as c:\.m2\repository on Windows. (If Windows Explorer does not allow you to create the .m2 folder name, use the mkdir command in a console window instead.)
  3. Open the settings.xml file in your Maven conf directory (e.g., c:\apache-maven-2.0.9\conf) and specify the repository directory. For example:

    Ensure that this entry is not commented out in this file.


If you want to use Ant instead of Maven or the Mule IDE, download and install it before installing Mule.

Setting Up Your Environment (Not Required for Mule IDE Users)

Before you can use Mule, you must create environment variables for Java, Mule, and optionally Maven or Ant, and update your path to point to their bin directories (examples shown below). If you are using the Mule IDE with Eclipse, these steps are not required.

If you will run Mule as a Windows service, you must create system environment variables instead of user environment variables.
  1. Create an environment variable called JAVA_HOME and set it to the directory where the JDK is installed.
  2. If you will use Maven, create an environment variable called MAVEN_HOME and set it to the directory where you unpacked Maven, and then create an environment variable called MAVEN_OPTS and set it to -Xmx512m -XX:MaxPermSize=256
  3. If you will use Ant, create an environment variable called ANT_HOME and set it to your Ant home directory.
  4. Create the MULE_HOME environment variable and set it to the location where you will install Mule. If you are running Windows, the installation path must not contain any spaces (for example, you cannot use C:\Program Files). A good workaround is to create a root directory called Mule (for example, C:\Mule). This step is not required if you will use the Mule IDE.
  5. Update the PATH environment variable so that it includes the path to the JDK, Maven, Ant, and Mule binaries. This step is not required if you will use the Mule IDE.

If you are using Windows, you can use the System utility in the Control Panel to add the environment variables and edit your path. Alternatively, you can use the export or set commands (depending on your operating system) at the command prompt, as shown in the following examples:

export JAVA_HOME=/opt/java/jdk
export MAVEN_HOME=/opt/apache/maven-2.0.9
export MAVEN_OPTS='-Xmx512m -XX:MaxPermSize=256m'
export MULE_HOME=/opt/mule


set JAVA_HOME=C:\Program Files\Java\jdk
set MAVEN_HOME=C:\Apache\maven-2.0.9
set MAVEN_OPTS=-Xmx512m -XX:MaxPermSize=256m
set MULE_HOME=C:\Mule

You are now ready to install Mule. If you are installing Mule Enterprise, read the next section. If you are installing the community or snapshot release, skip ahead to that section.

Installing Mule Enterprise

These instructions are for Mule Enterprise only. For the community or snapshot releases, skip to the next section.

This section describes installation of Mule Enterprise. Follow the instructions for the version of the file you downloaded.

Installing the TAR.GZ

  1. If you downloaded the TAR.GZ version of Mule Enterprise, simply decompress the files into the Mule home directory you specified above. You must use a decompression utility like WinZip, not just the built-in Windows extractor.
  2. Do one of the following:

Installing the JAR

  1. If you downloaded the JAR version of Mule Enterprise onto Windows, double-click the file to launch the installer. If you do not have Java associated with JAR files by default, open a command prompt, navigate to the directory where you downloaded the JAR file, and then enter the following command:
    java -jar mule-enterprise-standalone-installer-<version>.jar

    where <version> is the version number in the file name.

  2. Follow the instructions in the installer to install Mule. You will also be given options for installing the Profiler pack, which helps you identify memory leaks in your custom Mule extensions, and the scripting module, which provides facilities for using scripting languages in Mule.
  3. When you are prompted to specify the installation directory, be sure to specify the same directory as you specified for the MULE_HOME environment variable.
  4. Do one of the following:

Set Up the Maven Repository

You are now ready to set up your Maven repository as follows:

  1. Open a command prompt and navigate to the Mule bin directory.
  2. Type populate_m2_repo.cmd followed by the location of the Maven repository directory (the same directory you specified in the settings.xml file when you installed Maven).

For example:

cd c:\mule\bin
populate_m2_repo.cmd c:\.m2\repository

This step is required to populate the Maven repository with the local Mule Enterprise JAR files from the distribution. Note that when you add Mule Enterprise-only features to your code, you must add the correct [dependencies] to your POM before building your project with Maven.

You have completed the Mule installation and setup. You can now go to the Mule IDE User Guide for information on getting started, or skip to the section on Running Mule if you will not use the Mule IDE. If you want to install multiple instances of Mule on the same machine, Installing Multiple Instances.

Installing the Mule Community or Snapshot Release

This section describes installation of the community or snapshot release on Windows or Linux/UNIX.

  1. If you have a previous release already installed, you should delete the directory where it is installed before installing the later release.
  2. Go to the Mule download page.
  3. Click the link next to the release you want to download. Use the .zip links for installing on Windows and the .tar.gz links for installing on Linux/UNIX. The latest releases are at the top of the page.
  4. On Linux/UNIX, if you prefer to download through a shell instead of a browser or need to download to a remote computer without X-Windows, you can download the distribution using your download tool. For example to download the Mule 2.0.1 snapshot using wget, you would enter the following command all on one line:

  5. After the distribution is downloaded, extract the files from it into the MULE_HOME directory you specified when setting up the environment variables. For example, on Linux/UNIX, you would switch to your MULE_HOME directory, and then enter a command like this to extract the files:
    tar -xvzf mule-full-2.0.1-SNAPSHOT.tar.gz

Installing Multiple Instances

After installing Mule, you can install multiple secondary instances on the same machine, allowing users to set up their own directories for configuration files, logs, and JAR files that interact with the primary Mule installation. On UNIX machines, you can use the script in the Mule bin directory to set up these secondary instances. If you are installing on Windows, or if you want to configure the secondary instances manually, take the following steps:

  1. Run Mule from the primary instance so that the license acceptance and third-party libraries will be properly configured and available for secondary instances. If you are running the enterprise version of Mule, also apply the license to the primary instance before setting up the secondary instance.
  2. Log in as the user who will use a secondary instance.
  3. Create a directory for the secondary instance with the following subdirectories:
    • /bin - Startup scripts
    • /conf - Local configuration files
    • /examples - Examples (optional)
    • /lib/user - User JARs
    • /logs - Local logs
  4. Copy the files from these subdirectories in the primary Mule instance to the corresponding subdirectories in the secondary instance directory. For example, if your primary Mule instance is in C:\Mule and your secondary instance is in C:\Mule2, you'd copy C:\Mule\bin to C:\Mule2\bin, copy C:\Mule\conf to C:\Mule2\conf, and so on.
  5. Create an environment variable called MULE_BASE that points to the secondary instance directory, and create an environment variable called MULE_HOME that points to the location of the primary Mule instance. Using the previous example, you would set MULE_BASE to C:\Mule2 and set MULE_HOME to C:\Mule.
  6. Add the MULE_BASE/bin directory to the system path so that the Mule startup script is launched from MULE_BASE
    instead of MULE_HOME.
  7. Repeat these steps for each user who will use a secondary Mule instance. Each secondary instance must be in its own directory, and you must set the MULE_BASE and MULE_HOME environment variables separately for each user.

When users run Mule, the files from their secondary instance (MULE_BASE directory) will be loaded first, allowing users to put updated JARs in their MULE_BASE directory and test different scenarios without affecting the primary instance.

Running Mule

If you are using the Mule IDE, you can run Mule from within Eclipse. Alternatively, you can run Mule by entering the following command at the command prompt:

mule [-config your-config.xml]

where your-config.xml is the Mule configuration file you want to use. For a quick start, run the Echo Example to see how this works. For information on the different ways in which you can run Mule, see Running Mule.

If you are running the community release of Mule, the [MuleSoft Public License] is displayed page by page when you first run Mule. To advance a page, press Enter. At the end of the license display, type y to accept the license file and proceed with startup.

Next Steps

After you have installed and run Mule, read Basic Usage to get a deeper understanding of how you work with Mule. You can work with the Examples, which provide an easy way to get up and running in Mule very quickly. For best results, start with the Echo Example and work your way down the list. For a tutorial on developing a Mule application, see the Tutorial.

<< Previous: Where Should I Go Next? Next: Running Mule >>
Adaptavist Theme Builder Powered by Atlassian Confluence