Project Wiki
Views

InstallingFromWarFileDistribution

From Wiki

Jump to: navigation, search

Installing from the War File Distribution:  Ant Scripts

How Do I Install?

If you don't use the Windows or Linux installer then you can install using the WAR File Distribution zip.

Download the following file:

 jasperserver-<ver>-bin.zip


Ant Scripts for Installation?

Yes, Apache Ant install scripts will take care of all the configuration for multiple application servers and databases.

We call this collection of Ant scripts and templates "Buildomatic".


The Ant Scripts are called "Buildomatic"?

Yes, the Ant installation scripts are called "buildomatic" because they are all contained in a directory called "buildomatic". (Also, the same scripts can be used to build the source code.)


Which Applications do the Ant Scripts Support?

The War File Distribution supports multiple databases and application servers automatically.

Application Servers Supported:

 Tomcat
 JBoss
 GlassFish

Databases Supported:

 MySQL
 PostgreSQL

Additional Support:

Users have collaborated to support many other applications. We will be documenting these additional applications here on the Wiki. For now, you can search on the Forum postings. These additional applications are not automatically supported with the buildomatic Ant scripts.

 Oracle
 SQL Server
 Sybase
 Resin


What Do I Need Before I Get Started?

You will need:

  • An application server
  • A Database
  • Java (JRE or JDK)


I'm Ready to Start Installing!

OK, let's get right to it.

Assumptions:

  • You have your application server installed
  • Your application server is shutdown
  • You have your Database installed
  • Your database is running
  • You have Java installed (1.5 or 1.6)
  • You have downloaded the War File Distribution zip (jasperserver-<ver>-bin.zip)
  • You have unpacked the zip file (the directory will be known as the <js-install> dir)


1) Go to Buildomatic Directory


 cd <js-install>/buildomatic
  
 example: C:\jasperserver-3.5.0-bin
 example: /home/user/jasperserver-3.5.0-bin


2) Configure for Your Database (and App Server) Properties

We will set up a master properties file that will specify all the settings specific to your environment.

There are sample master properties files for the supported databases in this directory:

 <js-install>/buildomatic/sample_conf

Copy the mysql or postgresql sample file and change the name of the file:

 cd <js-install>/buildomatic
  
 copy sample_conf/mysql_master.properties    default_master.properties
    or
 copy sample_conf/postgresql_master.properties   default_master.properties


3) Edit default_master.properties

Now we will add your specific settings to the file you just copied.

Edit default_master.properties:

 3a) MySQL

 appServerDir=<your setting>    (path to your application server)
 dbUsername=<your setting>
 dbPassword=<your setting>
 dbHost=<your setting>
 dbName=<your setting>

 3b) PostgreSQL

 appServerDir=<your setting>    (path to your application server)
 dbUsername=<your setting>
 dbPassword=<your setting>
 dbHost=<your setting>


4) Note: Ant Is Already Pre-Configured

You do not need to download the Apache Ant build tool. It is pre-configured to be used with the buildomatic install scripts.

You can see that Ant is pre-configured by running:

 js-ant gen-config


5) Note: For Glassfish

If you are installing to the Glassfish application server, then you should leave your Glassfish running. Glassfish needs to be running when a web application is deployed.


6) Install JasperServer

 cd <js-install>/buildomatic
  
 js-ant create-js-db (*note: in mysql, before it creates the database it tries to connect to the mysql database. I had to grant the user select privileges on that database for this step to run. I later revoked it. Based on the mysql query log I think you could also just create the database manually & skip this step)
  
 js-ant init-js-db-ce
  
 js-ant import-minimal-ce
  
 js-ant deploy-webapp-ce


7) Load Sample Data (Optional)

The sample data is handy because it loads examples of Reports, OLAP Views, non-Admin Users, etc. In addition, two sample databases are created that have OLAP cubes containing thousands of rows of data. Some of these sample resources are used as examples in the JasperServer User Guide PDF.

 cd <js-install>/buildomatic
  
 js-ant create-sugarcrm-db
  
 js-ant load-sugarcrm-db
  
 js-ant create-foodmart-db
  
 js-ant load-foodmart-db    (can take 5 minutes or so)
  
 js-ant update-foodmart-db
  
 js-ant import-sample-data-ce
  


Start JasperServer and Login

Start Tomcat: /path/to/tomcat/bin/catalina.sh start (*note: I got the below errors on DB connection attempt because it was trying to connect to localhost with user root and password password.
2010-11-19 13:34:51,448 WARN JDBCExceptionReporter,main:100 - SQL Error: 0, SQLState: null
2010-11-19 13:34:51,450 ERROR JDBCExceptionReporter,main:101 - Cannot create PoolableConnectionFactory (Could not create connection to database server. Attempted reconnect 3 times. Giving up.)

To fix, I copied META-INF/context.xml to /path/to/tomcat/conf/Catalina/localhost/jasperserver.xml)

Login URL:

 http://hostname:8080/jasperserver
  
 Example:
 http://localhost:8080/jasperserver
 http://my.jasperserver.host:8080/jasperserver

Login:

 Login User:       jasperadmin
 Login Password:    jasperadmin


Check Your Java Memory Settings

Go to the Troubleshooting section of the Wiki and double-check your Java Options for optimal runtime performance.