<< PREVIOUS

 

 

MANUAL INSTRUMENTATION

 

Supported Linux Version: The following configuration is tested on RHEL 7.5 Operating System. To manually configure the TomcatServer with VSP, follow the steps below: 

  1. Shut down Tomcat Server (if it is running) using the command:

    1. $CATALINA_HOME/bin/shutdown.sh

       

       

  2. Create a file setenv.sh in the directory $CATALINA_HOME/bin. Add content below to the file:

     

    export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -javaagent:/opt/virsec-web-mem/iae-java/instrumentation.jar -DVSP_HOME_WEB_MEM=/opt/virsec-web-mem -Dvirsec_appcontextpath=<AppCollectiveID>"

     

    NOTE:

    Ensure that <AppCollectiveID> mentioned above is replaced with the App Collective ID in the CMS Application Configuration section

     

  3. Start the Tomcat Server using any one of the below methods: 

    1. Method 1: Using Startup Script:

      1. $CATALINA_HOME/bin/startup.sh

         

         

    2. Method 2: Using init service:

      1. Example: systemctl start <tomcat-service-name>

      2. A sample tomcat.service script is provided below. Verify that the variable WorkingDirectory is present. If it is not, add it as depicted below:

         

        # Systemd unit file for tomcat

        [Unit]

        Description=Apache Tomcat Web Application Container

        After=syslog.target network.target

         

        [Service]

        Type=forking

         

        Environment=JAVA_HOME=/opt/jdk1.8.0_161

        Environment=CATALINA_PID=/opt/apache-tomcat-8.5.30/temp/tomcat.pid

        Environment=CATALINA_HOME=/opt/apache-tomcat-8.5.30

        Environment=CATALINA_BASE=/opt/apache-tomcat-8.5.30

        Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'

        Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'

         

        WorkingDirectory=/opt/apache-tomcat-8.5.30

        ExecStart=/opt/apache-tomcat-8.5.30/bin/startup.sh

        ExecStop=/bin/kill -15 $MAINPID

         

        User=tomcat

        Group=tomcat

         

        [Install]

        WantedBy=multi-user.target

         

 

<< PREVIOUS