Currently the self-installer is fully compatible with Tomcat, Jetty, JBoss, and Glassfish. Other platforms may still require manual editing of the start scripts.
As part of the installation process, change the default application name to a meaningful name. Also, change the default newrelic.yml file permissions to be read/write only for the owner of the app server process.
Using the Java self-installer
To use the Java agent, you need a New Relic account.
- Log in to New Relic.
- Select Get Started. If you have existing applications, select [plus-circle] Add more
- From Choose your language, select Java, and follow the installation steps. The UI prompts you to download the installer.
Unless you have special considerations, you should be able to complete your New Relic install by following the directions on Get started with Web App Monitoring. This page provides additional information on the install process.
Alternate file download procedure
The Account settings page lists the most recent agents by platform in the right-hand column.
From the New Relic menu bar, select (account) > Account settings.
Download the agent for your platform.
Unpack newrelic.zip into your app server's root directory. For Glassfish, unpack newrelic.zip into your domain's directory.
unzip newrelic.zip -d /path/to/appserver/
Copy a "clean" newrelic.yml config file (containing only the default settings provided by New Relic) into the newrelic directory.
Running the installer
The installer is bundled inside the agent jar. Execute it from the newrelic directory with the
cd /path/to/appserver/newrelic java -jar newrelic.jar install
The installer will find your start script, back it up, and edit it to add the agent switch.
Options for the installer include:
||Display help information.|
||Your account license key.|
||Location of your application server. Required if newrelic is not in your app server home directory.|
The installer provides feedback on whether the install succeeded.
- If it runs successfully, it will tell you to restart your app server, exercise your app, and log in to see your data.
- If it did not complete, it will explain why, and point you to Java agent manual install.
JSVC on Windows
On Windows, the installer will add itself to catalina.bat, but not to the jsvc startup command. Look for jsvc support in an upcoming release.
For more help
Additional documentation resources include:
- Java agent manual installation (directions for manual install on Java platforms)
- Upgrade the Java agent (upgrading an existing Java installation)
- New Relic for Java (overview of features, compatibility, installation, and configuration)
- Uninstall the Java agent (how to remove New Relic's Java agent from your app)