We support Asset Bank on either Debian Stretch or the latest Ubuntu LTS. With these distributions, we can ensure that all necessary packages, including those required for SSO, can be installed from the distribution repositories (not from source) and benefit from security patches and fixes.
1. Install required software
- Install Java 8 OpenJDK.
- Install a recent version of Tomcat 7 or 8. We currently recommend 7.0.82 or 8.5.24. See paragraph 3 for notes about configuring Tomcat.
- If you do not already have a database, install the latest version of MySql. Currently we recommend MySQL 5.7 Community Edition.
- Make sure that the image libraries are installed for the formats you want to support. For example, commonly required libraries are:
libjpeg-devel or libjpeg-dev
You 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
libwebp-dev
librsvg2-2
librsvg2-dev
librsvg2-bin -
Install Ghostscript 9.56.1.
tar xzf ghostscript-9.56.1.tar.gz
cd ghostscript-9.56.1
./configure
make
sudo make install - Install the latest version of ImageMagick 6.
ImageMagick 7 is not currently supported. Install as follows:
tar xzf ImageMagick-6.X.X-X.tar.gz
cd ImageMagick-6.X.X-X
./configure --without-gcc-arch -with-rsvg
make
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 -
cd Image-ExifTool-#.##
perl Makefile.PL
sudo make installIf 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.
e.g.
tar xf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
cp wkhtmltox/bin/wkhtmltopdf /usr/local/bin - 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. If the application is considered business critical then you could also set up URL monitoring.
2. Install the webapp
- Contact our Customer Services team on support@assetbank.co.uk to get the installation files
- Unzip the installation package to a convenient location on your hard drive. This will create a directory called 'asset-bank'.
- Stop Tomcat (if it is running).
- Move the directory 'asset-bank' into [Tomcat]/webapps.
3. 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.
- [tomcat]/webapps/asset-bank
- [tomcat]/logs
- [tomcat]/work
- [tomcat]/temp
- 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 URIEncoding="UTF-8" to the “Connector” element, 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"/> -
Locate the file [Tomcat_Home]/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.
<init-param>
<param-name>mappedfile</param-name>
<param-value>false</param-value>
</init-param>The resulting block of the web.xml file, once you have inserted the above, should look like the code below.
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>mappedfile</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
4. Configurable settings
Asset Bank configuration changes can be made by changing the settings file,[Tomcat]\webapps\asset-bank\WEB-INF\classes\ApplicationSettings.properties.
To make sure that Asset Bank can send emails, then please update the following settings:
# The SMTP server for outgoing emails:
emailSMTP=localhost
# SMTP PORT (leave blank for default 25)
emailSMTPPort=
# SMTP authentication username (leave blank for no authentication)
emailSMTPUsername=
# SMTP authentication password (optional)
emailSMTPPassword=
It is possible to change the date formats in Asset Bank. Please refer to this article.
If you are installing an Enterprise version of Asset Bank that has Multi-Language enabled, please refer to this knowledge base article.
5. Install license
You will have received a license file license.lic by email. This is valid for 14 days (for evaluation) or indefinitely (for production).
Copy the license file license.lic to
[Tomcat]/webapps/asset-bank/WEB-INF/classes.
6. Set up the database
Follow the database setup instructions in Database & Advanced Setup
7. (Optional) Set up FTP for Bulk Upload
For example, to allow users to upload very large files and it is not possible to map a UNC or network share to the bulk-upload directory users can upload their files for Bulk Uploading using FTP. To enable this you need to install or enable an (s)FTP server.
You will need to create an FTP user, for example called assetbank-ftp. For security reasons this user should be jailed in their home directory.
The property 'bulk-upload-directory' in the ApplicationSettings.properties file should point to the home directory of the FTP user. The easiest way to do this is to create a symbolic link in [tomcat]/asset-bank called 'bulk-upload', pointing to the FTP user's home directory. If you do this then you don't need to change the value of the setting as it is that by default.
Both the FTP user and Tomcat need to be able to read and write to this 'bulk-upload' directory. The easiest way to do this is by ensuring that the Tomcat user and the FTP user are in the same group and giving group read/write permissions on the directory.
8. Integrate Tomcat with Apache
We recommend that you setup Apache to proxy for Tomcat. Please follow the instruction on how to setup Apache Web Server integration.
9. Start the Application
- Start or restart Tomcat.
- Ready to run - you should be able to access the Asset Bank on http://localhost/asset-bank/ from a browser on the server, or http://[server ip address]/asset-bank/
- from any other computer on your network.
Note: If you did not follow step (3.5) or (11) then you will need to specify port 8080, e.g. http://[server ip address]:8080/asset-bank/ - The application will start with a “Setup Wizard” which will allow you to easily set up your Asset Bank.
Note: On first run the “Setup Wizard” will ask you for a password to prevent access from non-admin users. This password can be changed using the setting setup-wizard-password in the ApplicationSettings file. - Login as the default admin user:
- Username: admin
Password: password - Change the password of the default admin user ‘admin’ by going to the 'Your Profile' link in the top right. This is important as it is easy to forget that this user exists once you start adding your own, and it is especially important, for obvious security reasons, if your Asset Bank is available to the wider internet. Alternatively, remember to delete this user as soon as you have added one or more other Admin users.
10. Upgrade to the latest version
The installer may not contain the most recent version of Asset Bank (although it should be close!) To upgrade your Asset Bank to the latest version (assuming you have a license that allows it), then please follow these instructions.
11. Backup procedure
You need to ensure that the database and files are backed up regularly (we advise nightly). For information on backing up and restoring Asset Bank please read our knowledge base article.
The disc usage of the Asset Bank installation should also be monitored to ensure that the application does not run out of room. This includes where the Asset Bank assets are stored and the Tomcat logs.
12. Uninstall Asset Bank
Please proceed to uninstall all of the pre-requisite software - as mentioned in step 1 - and drop the database that was generated during step 6. To complete the uninstall, stop Tomcat, delete the Tomcat]\webapps\asset-bank folder and restart Tomcat. You may also wish to revert changes to your Tomcat installation as mentioned in step 8 and changes made to your web server in step 8.
Comments
0 comments
Please sign in to leave a comment.