Preparing to Deploy APM Java Agent on WebLogic

Before you can download and install an APM Java Agent, ensure that you set the staging directory in the target host running the application server. The application you want to monitor is installed on this application server.

Setting the Staging Directory


If you are trying to deploy the APM Java Agent agents over a proxy server, then you need to set the proxy variables, http_proxy and https_proxy on the host where you’re deploying the agents.

If you’re using a Bash shell:
  • export http_proxy=<port>/

  • export https_proxy=<port>/

The staging directory, ${STAGE_DIR} is the path to a directory that is created by the download script, where the software is downloaded, and from where you run the provisioning script that comes with the bundle.


The staging directory must not exist prior to running the downloader script. You should set the environment variable to the staging directory, so that the variable is used by the installation script to automatically create the directory during installation.

Set the environment variable to the staging directory:

  • If you're using a Bash shell:

    export STAGE_DIR=/scratch/apm_staging

  • If you're using a C shell:

    setenv STAGE_DIR "/scratch/apm_staging"

You can use any directory as a staging directory, but we recommend that you use a directory similar to /scratch/apm_staging.

Setting the DOMAIN_HOME Variable

Set the DOMAIN_HOME variable to point to the WebLogic Server domain.

  • If you're using a Bash shell:

    export DOMAIN_HOME=<WebLogic Server Domain>

  • If you're using a C shell:

    setenv DOMAIN_HOME "<WebLogic Server Domain>"

Setting the Registration Key

After creating or downloading a registration key, set the REG_KEY variable to the registration key.

  • If you're using a Bash shell:

    export REG_KEY=<Registration Key>

  • If you're using a C shell:

    setenv REG_KEY "<Registration Key>"

Deploying the Gateway

Gateway is not a mandatory component while deploying Application Performance Monitoring. Use the Gateway in the following scenarios:
  • If you have an application server that does not support Transport Layer Security (TLS) protocol 1.2

  • If you have older versions of .NET IIS servers and Java Application Servers with JDK less than 1.7 (for example, WebLogic 10.3.6)

Before deploying, review the information in Prerequisites for Deploying Oracle Management Cloud Agents. For instructions on how to deploy the Gateway, see Deploying the Gateway.

Setting the Gateway Variables

Set the values for Gateway host and port.

  • If you're using a Bash shell:

    export GW_HOST=<Gateway Host Name>
    export GW_PORT=<Gateway Port>
  • If you're using a C shell:

    setenv GW_HOST "<Gateway Host Name>"
    setenv GW_PORT "<Gateway Port>"