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

Installing Mule

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

Distribution Types

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

  • MuleSource supported release (Enterprise Edition): the latest, fully tested release of Mule created by MuleSource that includes premium features not found in the Community Edition. The Enterprise Edition provides access to technical support, maintenance patches, and the MuleSource knowledge base and is suitable for development, pre-production, and production environments alike. You can download and install the 30-day trial of the latest Enterprise Edition (version 2.1) here.
  • Latest stable community release: the latest stable release of the Community Edition of Mule. This distribution is best for development or pre-production environments. (The Enterprise Edition is the best choice for production environments.) You can download the Community Edition 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.

For the Community Edition and snapshot releases, 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].

Supported Platforms

Mule will run on any platform that supports Java, including:

  • Windows XP SP2 and Windows 2000
  • Linux, Solaris, AIX, and HP-UX
  • Mac OSX

For the latest release of Mule Enterprise Edition, MuleSource Quality Assurance has certified the following platforms:

Operating Systems: Red Hat Enterprise Linux 4.0 (32-bit) and 5.2 (64-bit) and Windows 2003 Server
Messaging: ActiveMQ 4.1 and WebSphere MQ Series 6.0.1
Databases: Derby and Oracle 10g 10.2.2.1.0
Java: JDK 1.5 and 1.6

If you download one of the compressed distributions, you will need a compression tool such as WinZip (Windows) or GZip (Linux/UNIX) to decompress the ZIP or TAR file.

Installing Required Third-party Software

Before you install and run Mule, you must install Java and Maven.

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.
  1. Install Java Developer Kit (JDK) 1.5. Note that JDK 1.4.x will work if you are not using 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.
  2. 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.
  3. 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.)
  4. 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:
    <localRepository>c:/.m2/repository</localRepository>
    
    

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

  5. If you want to use Ant to build the examples instead of Maven, download and install it if you have not done so already.

Setting Up Your Environment

Before you can use Mule, you must create environment variables for Java, Maven, Mule, and optionally Ant, and update your path to point to their bin directories (examples shown below).

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. Create an environment variable called MAVEN_HOME and set it to the directory where you unpacked Maven.
  3. Create an environment variable called MAVEN_OPTS and set it to -Xmx512m -XX:MaxPermSize=256
  4. If you will use Ant, create an environment variable called ANT_HOME and set it to your Ant home directory.
  5. 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).
  6. Update the PATH environment variable so that it includes the path to the JDK, Maven, Ant, and Mule binaries.

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:
Linux/UNIX

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

Windows

set JAVA_HOME=C:\Program Files\Java\jdk
set MAVEN_HOME=C:\Apache\maven-2.0.9
set MAVEN_OPTS=-Xmx512m -XX:MaxPermSize=256
set MULE_HOME=C:\Mule
set PATH=%PATH%;%JAVA_HOME%/bin;%MAVEN_HOME%/bin;MULE_HOME/bin

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

Installing Mule Enterprise Edition

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

This section describes installation of the Enterprise Edition release on Windows or Linux/UNIX. The Enterprise Edition includes a graphical installer that walks you through the installation process.

  1. If you are running UNIX, double-click the JAR file to start the installer. If you are running Windows and 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-<version>-ee-installer.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.

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.

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

You have completed the Mule installation and setup. You can now skip the next section and read the section on running Mule.

Installing Mule Community Edition or Snapshot Release

This section describes installation of the Community Edition 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:
    wget http://snapshots.dist.codehaus.org/mule/org/mule/distributions
    /mule-full/2.0.1-SNAPSHOT/mule-full-2.0.1-SNAPSHOT.tar.gz
    

  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
    

Running Mule

The simplest way to run Mule is to enter 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 Mule Community Edition, the MuleSource 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, which shows you how to configure the Stock Quote example and add functionality.

<< Previous: Quick Start Next: Running Mule >>
Adaptavist Theme Builder (3.3.2-conf2.10) Powered by Atlassian Confluence 2.10, the Enterprise Wiki.
Free theme builder license