Mac OS X Installation
These instructions are intended to be used with Mac OS X 10.5 (Leopard). Asset Bank can run on the Server or Client (standard) versions of Mac OS X.
Please contact Customer Support if you would like to install Asset Bank on an earlier or later version of Mac OS X
1. Install required software
- 1.1) Asset Bank requires Java 1.5 or higher (on the server). Mac OS X includes Java 1.5 so you don't need to install it separately. We recommend that you apply all OS and Java updates available from Apple before installing Asset Bank.
- 1.2) Install MacPorts by following the instructions on the MacPorts web site. MacPorts makes it easier to install many of the libraries and tools that Asset Bank uses.
- 1.3) Configure MacPorts variants by editing /opt/local/etc/macports/variants.conf and adding the following line: +lcms +gs
- 1.4) Install image libraries and tools using MacPorts by running the following command: sudo port install jpeg tiff libpng lcms dcraw ghostscript ImageMagick p5-image-exiftool ffmpeg dos2unix
- 1.5) If you are using Mac OS X Server enable Tomcat:
- Open Server Admin (Server Admin will be in the Dock unless you have removed it)
- Go to Web -> Settings -> General and tick "Enable Tomcat"
- Press Save and then start (or restart) Web
If you are using Mac OS X Client install Tomcat using MacPorts: sudo port install tomcat6 This installs Tomcat to /opt/local/share/java/tomcat6. (Please do not install Tomcat 7)
- 1.6) If you do not already have a database you can use MySQL 5.0, which is built in to Mac OS X Server. If you are using Mac OS X Client you can install MySQL using MacPorts (sudo port install mysql5-server).
- 1.7) 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.
2. Install the webapp
- 2.1) Download the Asset Bank installation package: assetbank.zip
- 2.2) Unzip the installation package to a convenient location on your hard drive. This will create a directory called 'asset-bank'.
- 2.3) Shutdown Tomcat (if it is running).
- 2.3) Move the directory 'asset-bank' into [tomcat]/webapps. The Tomcat directory on Mac OS X Server is /Library/Tomcat.
3. Configure Tomcat
- 3.1) For security reasons, don't run Tomcat as root. For example, create a user called 'tomcat' and run as that. The version of Tomcat that is built in to Mac OS X Server runs as ‘_appserver’.
- 3.2) Ensure that the user that will be running Tomcat (‘_appserver’ on OS X Server) has recursive read/write permissions on the following directories. For example, set _appserver to be the owner, _appserverusr to be the group recursively (using chown -R _appserver:_appserverusr).
- [tomcat]/webapps/asset-bank
- [tomcat]/logs
- [tomcat]/work
- [tomcat]/temp
- 3.3) 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.
Add the following lines so that the tools installed using MacPorts are on Tomcat's PATH: PATH=$PATH:/opt/local/bin
export PATH Remove the following line if you are on OS X Server, because the Apple Tomcat scripts expect the PID file to be /Library/Tomcat/logs/tomcat.pid: CATALINA_PID=/tmp/tomcatpid.txt - 3.4) Turn off automatic deployment and reloading of the Asset Bank application by Tomcat.
- Open the file [Tomcat]\conf\server.xml in a text editor.
- Search for the string "autoDeploy". You should see something similar to <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
- If there are multiple host entries look for the one which applies to your Asset Bank application.
- Set autoDeploy="false"
- When Tomcat is installed auto reloading of applications is turned off by default. If for any reason you have changed this please ensure that reloadable is set to false for the Asset Bank application. See http://tomcat.apache.org/tomcat-4.1-doc/config/context.html for details.
4. Edit ApplicationSettings.properties
The settings file is in [tomcat]/asset-bank/WEB-INF/classes
Most of the settings in this file can stay as they are. Settings that you must change:
- imagemagick-path - this should point to the directory containing the ImageMagick executables (e.g. 'convert'). This is /opt/local/bin when ImageMagick has been installed using MacPorts.
- The FTP properties (beginning 'ftp') - see below for more information about FTP.
- emailSMTP - set to the URL of your SMTP mail server.
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 30 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.
If you are using the version of MySQL that is built in to Mac OS X Server you need to perform the following steps:
- In Server Admin, go to <computer name> -> Services, turn on MySQL and press Save.
- Go to MySQL and click ‘Set MySQL Root Password...’
- Turn on ‘Allow network connections’
- Click ‘Save’
- Edit /etc/my.cnf and add: bind-address = 127.0.0.1 to the [mysqld] section. This prevents non-local connections but still allows JDBC to work (The MySQL JBDC driver can only connect using TCP on non-Windows systems)
- Click ‘Start MySQL’ in Server Admin
- Install dos2unix using MacPorts and Convert the end-of-line characters in database-setup.sh
sudo port install dos2unix
cd [tomcat]/webapps/asset-bank/WEB-INF/manager-config/database
dos2unix database-setup.sh
- Run database-setup.sh: sh database-setup.sh <MySQL root password that you just set>
- Change the password for the MySQL application user:
# log in to MySQL
mysql -u application -p assetbank
# change password
SET PASSWORD = PASSWORD('<new password for application user>);
QUIT - Edit [tomcat]/webapps/asset-bank/WEB-INF/components.xconf and update the password for the data source to the one that you just set for the application user.
- Restart Tomcat. On Mac OS X server this can be done with the following commands:
launchctl unload /System/Library/LaunchDaemons/org.apache.tomcat.plist
launchctl load /System/Library/LaunchDaemons/org.apache.tomcat.plist
7. (Optional) Set up FTP for Bulk Upload
By default, users can upload files for 'Bulk Upload' using a Flash control or Java applet, which is shown on the first page of the Bulk Upload process.
If you do not want your users to use Flash or the applet for bulk upload, users can upload their files for Bulk Uploading using FTP. To enable this you need to install or enable an FTP server. If you don't have a preference, we recommend VSFTP.
You then 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.
To use FTP rather than the applet, ensure that the setting 'bulk-upload-use-applet' is set to false.
9. Start the Application
- 9.1) Start or restart Tomcat.
- 9.2) Ready to run - you should be able to access the Asset Bank on http://localhost:8080/asset-bank/ from a browser on the server, or http://[server ip address]:8080/asset-bank/
- 9.3) Login as the default admin user:
- Username: admin
Password: password - 9.4) 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 online. 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.
NOTE: If you use a SQL Server or Oracle database please remember to run the optimisation script against the relevant database after the upgrade has completed.
- Oracle
http://www.assetbank.co.uk/download/optimisation/oracle_indexes_ver_3-403.sql - SQL Server
http://www.assetbank.co.uk/download/optimisation/sqlserver_indexes_ver_3-403.sql
11. Integrate Tomcat with Apache (optional)
See integrating Tomcat with Apache. Note that we recommend that you do not use the version of Apache that is built into Mac OS X Server because the OS X Server Admin application corrupts the Apache configuration files if you use it to change any web settings after editing the Apache configuration files to integrate Tomcat with Apache.
12. 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.