You are on page 1of 5

ACTUALIZAR TOMCAT PARA MIDITER Y PRESEVAR LA CONFIGURACIÓN

Before implementing the new Tomcat version, make a backup of the following from the current
Tomcat:

Para Windows/Linux:

 For Windows based Tomcat using a service, launch the


<tomcat_install_dir>\bin\tomcat#w.exe where # indicates the version number. Copy the
Java Options, initial and max heap size found on the Java tab of the Tomcat Config panel to a
text file.
 For Windows based Tomcat using a script, back up the <tomcat_install_dir>\bin\Catalina.bat
 Realizar Backup a la carpeta de tomcat actual y renombrar agregándole _old
 For Linux based Tomcat, backup the <tomcat_install_dir>/bin/catalina.sh
 Backup the <tomcat_install_dir>/conf/server.xml
 Backup the <tomcat_install_dir>/conf/context.xml
 Backup the any keystore file
 Backup the <tomcat_install_dir>/webapps/ROOT content
 Backup the <tomcat_install_dir>/conf/Catalina directory. conf/Catalina/localhost contains
a file called arsys.xml which tells Tomcat where to find the midtier files. If the arsys.xml file
is not present, check the webapps directory for an arsys directory. If the webapps/arsys
directory exists, make note as it will need to be moved later.

Validar configuración del Smart Reporting en la consola de midtier/onboarding

Recommended sequence if upgrading to a different version of Tomcat. Ex: v7 to v8.5

1. Windows vs Unix new Tomcat installation

Para Windows: Download the Tomcat Windows installer. Ex: .zip

1. Stop the existing Tomcat service. Set it to Manual startup


2. Install a new Tomcat service on Windows following the installer. Ex: Tomcat8
service will be added to the services panel.
3. Optionally, you can unregister the old Tomcat service
 In a command prompt, go to the old Tomcat/bin directory.
 Execute the command: service.bat remove

Para Linux: Download the tar.gz download on the Tomcat download page Ex: tar.gz

1. Uncompress/untar the tar.gz file to deploy the new Tomcat.


2. Services vary so this is not covered here. Once the new Tomcat is installed, reset your
service
2. Adjust java settings
Reference article: REMEDY 9.x/18xx/19xx/20xx Release - CONFIGURATION CHECKLIST from the
BMC R&D PERFORMANCE TEAM
NOTE: Java options will depend on whether you are using Oracle Java or Open JDK.
Para Windows:

1. Execute the new tomcat#w.exe


2. Update the Java tab – Java options, initial heap size and max heap size using the
backup information recorded in the text file

Note: Be sure to put the java options in the Java Options field; do not put them in the Java 9 field.
The reference article above gives recommendations for initial heap size (-Xms) and max heap size (-
Xmx). Put the values for these options in their respective fields on the Tomcat config panel.

Para Linux: Linux or Solaris or Windows using a script in tomcat/bin:

1. Set the Java options in the setenv.sh or setenv.bat file. COPIAR EL SETENV.SH DEL TOMCAT
VIEJO Y ACTUALIZAR LA RUTA DEL APACHE DENTRO DEL ARCHIVO.
2. Use the backup copy to update the new version with the needed settings.

Unix Example:
export JAVA_HOME=/etc/alternatives/jre_1.8.0;
export CATALINA_OPTS="$CATALINA_OPTS -Xms3072m";
export CATALINA_OPTS="$CATALINA_OPTS -Xmx3072m";
export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxMetaspaceSize=256m";
export CATALINA_OPTS="$CATALINA_OPTS -XX:+UseConcMarkSweepGC";
export CATALINA_OPTS="$CATALINA_OPTS -XX:+UseCompressedOops";
export CATALINA_OPTS="$CATALINA_OPTS -XX:+UseParNewGC";
export CATALINA_OPTS="$CATALINA_OPTS -XX:NewRatio=2";
export CATALINA_OPTS="$CATALINA_OPTS -Djava.awt.headless=true";

3. Keep/Adjust JSP server settings (applies to both Linux and Windows)


Reference article: REMEDY 9.x/18xx/19xx/20xx Release - CONFIGURATION CHECKLIST from the
BMC R&D PERFORMANCE TEAM
1. tomcat/conf/server.xml COPIAR ESTE ARCHIVO DEL TOMCAT VIEJO AL TOMCAT NUEVO
2. tomcat/conf/web.xml COPIAR ESTE ARCHIVO DEL TOMCAT VIEJO AL TOMCAT NUEVO
3. tomcat/conf/context.xml COPIAR ESTE ARCHIVO DEL TOMCAT VIEJO AL TOMCAT NUEVO

4. Mid-tier config files


If using the arsys.xml to hook the Mid Tier application to Tomcat
1. Copy the old Tomcat/conf/Catalina directory to the new Tomcat/conf directory.
2. Verify the following file exists: ../newTomcat/conf/Catalina/localhost/arsys.xml
If midtier was deployed in the tomcat/webapps directory as arsys
1. Copy the old Tomcat/webapps/arsys directory to the newTomcat/webapps directory
NOTA: Copiar la carpeta Work que se encuentra en el tomcat Viejo al tomcat nuevo(contiene
el contenido de smart reporting y cmdb)

5. Update the Midtier filedeployer configuration

1. On Windows, stop the Remedy Mid Tier File Deployer service


2. On Unix, stop the Mid Tier file deployer process using the command, ps -ef | grep
monitor.type=Midtier, to find the PID and then use the kill command on the PID.
3. Modify the midtier/filedeployer/conf/armonitor.cfg file

 Update the line, Environment-variable: WEBSERVER_DEPLOYMENT_DIRECTORY


to point to the new Tomcat directory.
 For Linux, update the line, External-Process: process-type =
BMC:MidtierWebServer… so that it points to the startup.sh/shutdown.sh of the
new Tomcat
 For Windows, update the line: External-Windows-Service: process-type =
BMC:MidtierWebServer,… so that it points to the service name for the new
Tomcat

4. On Windows, start the Remedy Mid Tier File Deployer service


5. On Linux, execute the filedeployerStart.sh script found in the midtier/filedeployer directory.

6. Optional actions

 Check the webapps/ROOT contents – some installations use the ROOT application to
do automatic redirects to a /arsys context for the URL
 Check the tomcat/lib directory for any jar files that were added to the old Tomcat that
are not in the new one.
 Check the old-Tomcat/webapps directory for other subdirectories like eschat,
programd, rsso, etc. If other applications beyond Mid Tier are supported by Tomcat,
then they must be moved as well.

VALIDAR LUEGO DE EJECUTAR TODOS LOS PASOS

1. Con el comando: grep -r "jdk1.8.0_251" /home/remedy/ARSystem/ validar si aún persiste


la versión de java viejo en algún archivo, sin tomar en cuenta los .log(como se realizó en
sesión)
2. Consola de configuracion de midtier
a. Flush cache
b. Versión del Tomcat
c. Configuración de Smart Reporting/onboarding
3. Consola de smartit
4. Consola de Smart Reporting
5. Consola de cmdb
ACTUALIZAR TOMCAT PARA SMART IT

1. Install new Tomcat with different port. If you need the same port then stop the existing Tomcat and
then install the new Tomcat.

2. Stop new Tomcat.

3. Copy smartit.xml file from the old Tomcat conf/Catalina/localhost folder to a new
Tomcat conf/Catalina/localhost folder.

4. Copy sqljdbc4.jar, ojdbc6-11.2.0.4.jar, postgresql-42.2.1.jar and spring-tomcat-weaver-


2.5.6.SEC03.jar files from the old Tomcat lib folder to a new Tomcat lib folder.

5. Copy external-conf folder from the old Tomcat to a new Tomcat.

6. Configure JVM related parameter:

a. For Windows:

i. Open the old Tomcat tomcatXw.exe file.

ii. Open the new Tomcat tomcatXw.exe file.

iii. Copy the Java options from the Java tab of the old Tomcat to the new Tomcat. You
should replace the existing paths with the new Tomcat paths.

iv. Copy initial memory pool from the Java tab of the old Tomcat to the new Tomcat.

v. Copy the maximum memory pool from the Java tab of the old Tomcat to the new
Tomcat.

vi. Add <new-tomcat-path>/external-conf to Java ClassPath in the Java tab separated


with semicolon.

b. For Linux:

i. Copy the content of <old-tomcat-path>/bin/setenv.sh to <new-tomcat-


path>/bin/setenv.sh. You should replace the existing paths with the new Tomcat
paths.

7. Manually re-configure SSL of the new Tomcat.

8. Update File Deployer services:

a. Open <SmartIT installation folder>/Smart_IT/filedeployer/conf/armonitor.cfg

b. (Windows only) Update New Tomcat service name service-name = "xxxx"

c. Update old Tomcat path with new Tomcat path in armonitor.cfg

9. If you have rebranded Smart IT on the old Tomcat server, do the following:

a. From the old Tomcat server, copy the style-smart-it.css file from
the %TOMCAT_HOME%/webapps/tenant-custom-res/000000000000001 directory.
b. Paste the style-smart-it.css file on the new Tomcat server in
the %TOMCAT_HOME%/webapps/tenant-custom-res/000000000000001 directory. If the
directory does not exist create it. For more information on rebranding Smart IT,
see Rebranding Smart IT on the Universal Client.

10. Start Tomcat

You might also like