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 private IP address of the new server. 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 latest version of Tomcat 8 or Tomcat 9. We recommend you install it to the same directory as the old server.
- Make sure that the image libraries are installed for the formats you want to support. For example, the commonly required libraries are:
libjpeg-devel or libjpeg-devYou might need g++, build-essential and libxext-dev to compile from source.
libtiff-devel or libtiff-dev
libpng-devel or libpng-dev
liblcms2-devel, lcms2-devel or liblcms2-dev
Install Ghostscript 9.56.1.
tar xzf ghostscript-9.56.1.tar.gz
sudo make install
- Install the latest version of ImageMagick 7.
tar xzf ImageMagick-7.X.X-X.tar.gz
./configure --without-gcc-arch -with-rsvg
sudo make install
- Install ExifTool.
If you need to install from source then follow the above link or download version 9.49 and install as follows:
gzip -dc Image-ExifTool-#.##.tar.gz | tar -xf -
sudo make install
If you have trouble running the Makefile.PL command, you may need to install the perl-devel package. Exiftool will be installed to /usr/local/bin by default. Make sure this is in the PATH for the user running Tomcat.
- If you want Asset Bank to support RAW formats, install DCRAW. This is a single C file, which should be compiled (e.g. using gcc -o dcraw -O4 dcraw.c -lm -ljasper -ljpeg -llcms or use -DNO_JASPER if you get an error about jasper.h) and placed in the PATH. (e.g. /usr/bin).
- If you want to convert video files, install FFmpeg. Please see the generic or Debian/Ubuntu specific instructions for building and installing Ffmpeg on Linux.
- Install wkhtmltopdf. Download the appropriate archive for Linux i386 or Linux AMD64 unpack and copy the executable at wkhtmltox/bin/wkhtmlopdf to somewhere on the system PATH. (e.g. /usr/local/bin). Enter the PATH in the property ‘wkhtmltopdf-path‘ in ApplicationSettings.properties.
tar xf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
cp wkhtmltox/bin/wkhtmltopdf /usr/local/bin
- (Optional) If the database is running on the old application server then install a matching version of MySQL 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 startup 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.
3. Copy the webapp to the new server
Rsync 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.
4. Configure Tomcat
- For security reasons, don't run Tomcat as root. For example, create a user called 'tomcat' and run as that.
- Ensure that the user that will be running Tomcat (usually called ‘tomcat’) has recursive read/write permissions on the following directories. For example, set tomcat to be the owner recursively.
- Copy the file [tomcat]/asset-bank/WEB-INF/manager-config/tomcat/setenv.sh into [tomcat]/bin.
- Edit this file to ensure that the memory settings for Tomcat are suitable for your server. This step is necessary as by default Tomcat will not be given optimal memory to run as a production server.
- If you are using S3 storage for your Asset Bank you must set the AWS_REGION environment variable to match the region of your S3 buckets. An example of setting AWS_REGION can be found in setenv.sh.
- Open the file [tomcat]/conf/server.xml in a text editor and add the attribute secretRequired="false" to the port 8080 Connector element and URIEncoding="UTF-8" to both the 8080 Connector and 8009 Connector elements. If there is an address="::1" parameter then remove this. The Connector elements should read as such:
<Connector port="8080" protocol="HTTP/1.1"
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8"/>
Locate the file [tomcat]/conf/web.xml and search the file for 'JspServlet'. This should return an xml node of <servlet> containing some <init-param> values. You will need to add an additional <init-param> the same as the below.
The resulting block of the web.xml file, once you have inserted the above, should look like the code below.
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 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 be available over http://[server-ip]:8080/asset-bank on any computer on the same network.
10. Configure Apache
If the web server runs on the application server
You will need to configure Apache 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.