Learn
how to manually install the glass box agent on a
Tomcat server.
About this task
When AppScan® is
installed, the files needed for installing the server agent are saved
in a dedicated folder on your machine. To perform this task you will
need access to this folder, and to your application server.
Procedure
- On the Glass Box
page of a content scan job, expand the Download glass box agent
installer section.
- Extract the contents
of Manual_Setup.zip to your preferred location on the web server.
- Define a username and password for the
agent (only English
characters and numbers can be used):
- For a Linux™ server:
Add execution permissions to
AgentCredentials.sh
,
then run AgentCredentials.sh <username> <password>
- For a Windows™ server:
Run
AgentCredentials.bat <username> <password>
- Deploy GBootStrap web application:
- Log in to Tomcat Manager. The default location
is
http://<server_name>:<port_number>/manager/html
- In Deploy table > War file to deploy,
click Choose file
- Locate
GBootStrap.war (in the glass box folder you extracted),
and click Open
- Click Deploy and
verify that
GBootStrap has been added the applications list.
- Shut down Tomcat.
-
Configure Tomcat to always use the glass box agent by doing one of the following
actions:
- Through the environmental variable: Configure Tomcat's JVM through the JAVA_OPTS
environmental variables (if it does not exist, create it), with the value
-javaagent:<path_to_gbAgent.jar>
.
- Though batch/sh scripts: Pass arguments to the JVM running Tomcat by editing the
configuration scripts that are shipped with it:
Linux server:
- In the Tomcat folder (usually located in
<path_to_Tomcat_folder>/bin
), open
startup.sh
- Locate a line that begins with
CATALINA_OPTS
and add the following line below
it:export CATALINA_OPTS = $CATALINA_OPTS -javaagent:<path_to_gbAgent.jar>
- Save and close the file.
Windows server:
- In the Tomcat folder (usually located in
<path_to_JBoss_folder>\bin
), open
startup.bat
- Locate a line that begins with
set CATALINA_OPTS=
and add the following line
below
it:set CATALINA_OPTS = %CATALINA_OPTS% -javaagent:<path_to_gbAgent.jar>
- Save and close the file.
Important: Ensure that CATALINA_OPTS is initialized only once, and prior to the lines
above, so that other CATALINA_OPTS assignments do not overwrite -javaagent
.
Note: To add arguments to CATALINA_OPTS, use the %CATALINA_OPTS% / $ CATALINA_OPTS
convention.
- Restart Tomcat.