This guide describes how to install BellaDati WAR on Jetty. We recommend to use one of latest stable releases of Jetty 9. |
The BellaDati WAR file is the BellaDati application packaged in a WAR archive. It must be deployed into an existing application server and needs to be connected to a data warehouse running on an existing database server. |
Please read the following important notes before you begin installing BellaDati on Jetty:
Please follow the instructions on the Setting up the PostgreSQL Database page.
Download the BellaDati WAR distribution as a ZIP archive from the BellaDati download page and extract its content using a tool such as 7-Zip for Windows or Linux's GNU tar tools. Only one of the files in the ZIP archive is used for this setup - belladati.war
.
Avoid using Windows' built-in file extraction tool! This tool silently fails to extract files with long names. Other users have also reported problems with WinRAR.
Avoid using Solaris' default tar utility! Please use GNU tar on this operating system to extract BellaDati, as GNU tar handles long file names better.
You have successfully downloaded and extracted the BellaDati WAR distribution as described in the previous step. To configure Belladati, you need to extract and modify a configuration file placed inside the WAR archive by following these easy steps:
1. Extract application.properties
file from the WAR file using a tool such as 7-Zip for Windows or Linux's unzip tool.
unzip belladati.war WEB-INF/classes/conf/application.properties |
2. Edit extracted file WEB-INF/classes/conf/application.properties
. Under JDBC properties, remove the # sign in the first line. Update jdbc.url, jdbc.username and jdbc.password to match your system configuration. You can remove all lines starting with # from the JDBC properties section. The configuration should look like:
# APPLICATION properties application.url=http://localhost:8080 application.production-mode=true application.secure-mode=false # JDBC properties jdbc.resource=jdbc/belladati_db # when connecting directly to the db jdbc.driverClassName=org.postgresql.Driver jdbc.url=jdbc:postgresql://db_host:5432/belladati_db jdbc.username=belladati_dbuser jdbc.password=password # SMTP properties smtp.server.address=localhost smtp.server.username= smtp.server.password= # EMAIL properties email.sender=support@belladati.com email.footer=BellaDati Inc. # OpenID properties application.mybelladati.url=https://my.belladati.com application.registration=http://www.belladati.com/try application.registration.openid= # Google analytics properties application.google-site-verification= application.google-analytics-account= application.google-analytics-account.mercato= # Lucene index dir lucene.indexes=indexes |
Configuration settings are explained in detail in the BellaDati WAR Configuration Overview. |
3. Save configuration file WEB-INF/classes/conf/application.properties
and update the WAR archive. On Linux, the command looks like:
zip -d belladati.war WEB-INF/classes/conf/application.properties zip -u belladati.war WEB-INF/classes/conf/application.properties |
4. Copy the belladati.war
to $JETTY_HOME/webapps
.
Before you start Jetty, make sure you have configured the JAVA_HOME variable, which points to the installed Java. You can do it in this way:
$ export JAVA_HOME=/path/to/jdk |
You can also add the JAVA_HOME
parameter to /etc/default/jetty
. This will set the JAVA_HOME
variable whenever you start Jetty.
Jetty memory settings need to be modified to avoid the following issue:
OutOfMemory
errors when running BellaDati if these memory settings are not increased.To prevent this issue, follow the instructions below.
Set the JAVA_OPTIONS variable:
$ export JAVA_OPTIONS="-Xms1024m -Xmx2048m -XX:MaxPermSize=512m" |
Alternatively, you can set the JAVA_OPTIONS parameter in the /etc/default/jetty
file:
JAVA_OPTIONS="-Xms1024m -Xmx2048m -XX:MaxPermSize=512m" |
If you are using the Java Service Wrapper, follow these instructions:
Edit $JETTY_HOME/bin/jetty-service.conf
file (or create this file if it does not exist) and add the following to this file:
wrapper.java.additional.3=-Xms1024m wrapper.java.additional.4=-Xmx2048m wrapper.java.additional.5=-XX:MaxPermSize=512m wrapper.java.maxmemory=2048 |
For other environments and more information on memory settings, see the System Requirements.
Please note, that the value |
You can download the Java Service Wrapper for many different platforms. |
The default location for logs generated by BellaDati (see Configure logging for more details) is relative to the exploded belladati.war which is not suitable for long term storage.
To change the logs directory, add a new JVM option -Dlogs.location=<location>, where <location> is the desired absolute path to the parent directory in which logs will be stored, to your Jetty (see section 4.2 for more details on how to do it).
BellaDati is now ready to run in Jetty. You can start (or restart) the Jetty server with one of Jetty's start scripts (depends on Jetty version and your OS) from $JETTY_HOME directory:
bin/jetty.sh run
bin/Jetty-Service.exe
Point your browser to http://localhost:8080/belladati
. This starts the Setup Wizard, which will take you through BellaDati's setup procedure.