1. Obtain a new license
If the IP address of the application server is changing you will need a new license file. Please send a copy of the existing license file to our Customer Support Team along with the new IP address. The license file can be found in the following location on the application server: [tomcat]\webapps\asset-bank\WEB-INF\classes\license.lic.
2. Install the supporting applications on the new server
- Install Java AdoptOpenJDK 8. We recommend that you use the JVM HotSpot.
- Install the same version of Tomcat as the old server. On install use the JRE that you installed in step 1 (by default this will be C:\Program Files\AdoptOpenJDK\jdk-8.x_x). In the installation wizard, on the 'Choose Components' panel, deselect Manager and Documentation, then expand the Tomcat item and select Core, Service and Native. Now click Next. We recommend you install to C:\tomcat or D:\tomcat rather than in the Program Files directory, to make it easier to administer the web application.
- Install Ghostscript 9.50 and make sure to add the installation path to your system's path variable.
- Install ImageMagick into the same location as the old server and make sure to add the installation path to your system's path variable.
- Install Notepad ++ to ensure that configuration and log files can be edited and viewed efficiently.
- (Optional) If the database is running on the old application server then install a matching version of MySQL or SQL Server on the new server. If possible configure the same users/permissions as exist on the old server.
After installing software make sure that any services that are critical to Asset Bank running (Tomcat, MySQL, SMTP etc.) are set to automatically start up if they stop. This will make sure Asset Bank doesn't require manual intervention to get back up and running if the server ever goes down unexpectedly. If you are planning on connecting Asset Bank to your SQL Server database using Integrated Windows Authentication then you need to run Tomcat as the AD user that will be used to connect.
3. Configure Tomcat
- You need to change the default memory allocation for Tomcat as the default is not optimal for a production server. Run the Tomcat Service Manager utility [tomcat]\bin\tomcat8w.exe, unless you already have this running as a tray icon. On the Java tab, set values for memory pool. We recommend that the maximum memory is set to half the server RAM and the initial memory is half of that. For example a server with 16GB RAM would have the values:
- Initial memory pool=4096
- Maximum memory pool=8192.
- Ensure that Tomcat is pointed at the server JVM. On the Java tab, set Java Virtual Machine: C:\Program Files\AdoptOpenJDK\jdk_version_number\jre\bin\server\jvm.dll.
Open the file [tomcat]\conf\server.xml in a text editor and add the attribute URIEncoding="UTF-8" to the “Connector” elements, as shown here:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" />
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8"/>
NB: Tomcat versions above 8.5.51 have the AJP 1.3 Connector disabled by default - this needs to be enabled and the string updated to include secretRequired="false":
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" secretRequired="false"/>
4. Copy the webapp to the new server
Robocopy the existing [tomcat]\webapps\asset-bank directory to the new server. The bulk of the sync can be run whilst the application is live on the old server however, a final sync should also be actioned whilst the Tomcat service is stopped to ensure that all files are transferred.
Add the folder [tomcat]\webapps\asset-bank\WEB-INF\manager-config\win-tools to your PATH environment variable (ensure that this entry is entered before the ImageMagick path e.g. put it at the start).
5. Replace the license file
Replace the [tomcat home]\webapps\asset-bank\WEB-INF\classes\license.lic file that you copied across with the new one that you received from our Customer Support Team.
6. Configuring the database
If the database is running on the same server as the application
Backup the existing Asset Bank database from the old server (using mysqldump, or SQL Server Management Studio) and restore it to the new server. This should be actioned whilst the Tomcat service is stopped on the old server to prevent any changes to the database being lost during the migration.
Ensure that the [tomcat]\webapps\asset-bank\WEB-INF\classes\database-local.properties file is pointing to the database and that the database user and password are correct.
If the database is running on a separate server
Ensure that the [tomcat]\webapps\asset-bank\WEB-INF\classes\database-local.properties file is pointing at the database server.
7. Configure Storage Devices (Optional)
Applies to versions of Asset Bank that support Storage Devices
If you created one or more new Storage Devices and all of these are on network drives that will be accessible to the new server, then you don‘t need to move them. However, check that either the paths for each Storage Device use UNC or that the new server contains the same mapped drives (or change the paths by editing the Storage Device). If one or more of the Storage Devices are local, then you will need to move the directories to corresponding locations on the new server, and then configure the Storage Devices accordingly. You can change their paths if necessary but you do need to make sure that you have the same number of Storage Devices.
Applies to versions of Asset Bank that are prior to the introduction of Storage Devices
If you had a filestore root that wasn‘t inside the [tomcat]\webapps\asset-bank directory on the old server you will also need to copy that over to the new server. You can use the useRelativeDirectories and filestore-root settings from the [tomcat]\webapps\asset-bank\WEB-INF\classes\ApplicationSettings.properties file to determine where the filestore root is. If your file store root is on a separate server and it will still be available to the new server then you don‘t need to move it.
8. Update the application settings
Open the file [tomcat]\webapps\asset-bank\WEB-INF\classes\ApplicationSettings.properties from the new server in a text editor and update the settings to reflect the new server (i.e. ftp settings, filestore root etc.). Save and close the file.
9. Restart Tomcat on the new server
Asset Bank should now run on http://localhost:8080/asset-bank on the new server, mirroring the setup from the old server.
10. Configure IIS
If the web server runs on the application server
You will need to configure IIS to run on the new server in the same way that it did on the old server. The instructions in this support article should help you achieve this.
If the web server is external to the application server
Update the external web server to point at the new application server.