Install and Build
    
    	
These instructions are for installing a Mosaic site on your computer.
Currently the email lists require an account on opalstack.com. Contact us to see about adapting the code to your server.
Requirements
- Java
 
- PostgreSql
 
- Apache Tomcat
 
- third party open source java libraries, provided in the 
vendor repository
 
- a starting site, provided in the 
template repository
 
Install the Template site
- install the latest OpenJDK (java), PostgreSQL, and Tomcat (version 10.1)
 
- clone or download the 
template repository
- if cloned, the directory should be called 
template and is ready to go 
- if downloaded, there may be an extra level of directory after you uncompress and extract everything from the downloaded file
 
- the goal is to find the folder with the web app contents (WEB-INF, META-INF, css, js, .jsp and other files, etc). That folder should be renamed to 
template if it is called template-master. 
 
- move the 
template folder (with the web app contents) into Tomcat's webapps directory 
- move the jar files from the 
vendor repository into the tomcat/lib directory 
- create a new PostgreSQL database and a user with full access rights
 
- import template.sql into the database using 
psql -U <username> <database name> < template.sql 
- edit 
META-INF/context.xml for the webapp, set the url, username, and password values to match your database 
- run Tomcat
 
- access the site at http://localhost:8080/template
 
Build
- compile the classes and build the jar files using the included scripts
 
- install the new files into the tomcat webapp
 
- restart tomcat